Omega Owners Forum

Chat Area => General Discussion Area => Topic started by: Gaffers on 20 April 2012, 20:10:44

Title: linux grub hard drive help required
Post by: Gaffers on 20 April 2012, 20:10:44
This is a continuation of my thread about my lappy killing hard drives.

I booted from a live disk yesterday and I could mount and read/write on to the disk. All the files were there too.  I think the grub mst be buggered but any grub command I tried didn't work.

I am calling on the OOF community for your expertese.  I only get an hour of internet access a day or 20mb (whichever is reached first) and the connection is poor and slow.

I could do with your help, as aways thanks in advance
Title: Re: linux grub hard drive help required
Post by: TheBoy on 20 April 2012, 21:17:16
could be a million and one things, from bootsector to disk corruption. Is grub in bootsector, or 1st partition?
Title: Re: linux grub hard drive help required
Post by: dbug on 20 April 2012, 21:46:33
could be a million and one things, from bootsector to disk corruption. Is grub in bootsector, or 1st partition?

 :y
Title: Re: linux grub hard drive help required
Post by: Kevin Wood on 21 April 2012, 15:32:23
Boot config tends to be pretty complex in Linuces these days but you'll normally find the config for grub spread around /boot/grub, /etc/grub and /etc/grub.d possibly.

Normally you can recover it by calling grub to rewrite itself into the MBR and wherever else it lives, using the original config on your non-bootable system.

Have a look at the man pages for grub-install and grub-mkconfig for a start.

If it comes to grub-mkconfig you will have to point it where your original /boot partition has ended up mounted so it can find the original grub.cfg or whatever.

If it's frequently getting trashed it might be a sign that wherever it's living on the hard drive is getting overwritten by something else, e.g. it's also a block allocated to a filesystem / swap.

EDIT: once you do get it to boot, see if there's an update-grub script and run it as root. This will make double sure that you have the correct grub config back.