How do i install GRUB on 9.04/AMD64/EXT4 new install?

Associate
Joined
28 Oct 2002
Posts
1,510
Hi

I have just installed the RC of Ubuntu 9.04/64 using Ext4. However i see this note that says it won't reboot (its a dual boot vista system) unless i update GRUB to allow for Ext4.

There is this note:

Ext4 support in GRUB was provided by Colin King. If you choose to upgrade your / or /boot filesystem in place from ext2 or ext3 to ext4 (as documented on the ext4 wiki), then you must also use the grub-install command after upgrading to Ubuntu 9.04 RC to reinstall your boot loader. If you do not do this, then the version of GRUB installed in your boot sector will not be able to read the kernel from the ext4 filesystem and your system will fail to boot.

My Linux knowledge is not good. When its says run grub-install i assume i need to specify a device (in grub format). How do i know what to put?

Many thanks

Diss


edit


ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00008776

Device Boot Start End Blocks Id System
/dev/sda1 * 1 29519 237111336 7 HPFS/NTFS
/dev/sda2 29520 47884 147516862+ 83 Linux
/dev/sda3 47885 48641 6080602+ 5 Extended
/dev/sda5 47885 48641 6080571 82 Linux swap / Solaris

Disk /dev/sdb: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x04ce04ce

Device Boot Start End Blocks Id System
/dev/sdb1 1 7649 61440561 7 HPFS/NTFS
/dev/sdb2 7650 24321 133917840 b W95 FAT32
 
Last edited:
What a pain in the rear this GRUB thing is!!

It is happy to let you install and you only realize that something is wrong when you next reboot. :mad:

I was caught out by it as well. In my case, my existing boot partition was EXT3 and the new one was as well. The only difference was that the former had 128 inodes and the latter had 256.

I ended up moving the boot files, formatting the boot partition with 128 inodes, then moving the files back. You probably don't want to do this. :p

Need a bit more info... Where is Grub? MBR or install partition?

If it's in the MBR of disk #1 ( 400GB ) , then :

Code:
sudo grub-install /dev/sda


Documentation
 
thx eXor

i thought the sda bit needed to be something like (hd0,1) - or is that no longer the case?

how would i know whether sda = hd0,0 or whatever?

cheers

diss
 
thx eXor

i thought the sda bit needed to be something like (hd0,1) - or is that no longer the case?

how would i know whether sda = hd0,0 or whatever?

cheers

diss

You can use either. The fdisk output reveals all. sda = hd0 ; sdb = hd1

hd0,1 = 1st disk, second partition. If you want GRUB in the MBR, then you omit the partition. So, hd0 or sda.
 
If you install clean there's no special workaround needed.

You only need to re-install grub if you do an upgrade and change your ext3 fs to ext4 afterwards. This is what the note tells you.
If you've never installed Linux on that system before then it will ask you to install grub at the end of the install too.
 
thanks all

i have it sorted - didn't realise you could use sda or hd0 formats - very useful for future reference

re EXT4 - any idea when this will be fixed and what the data integrity issues are e.g. random data loss or loss in certain circumstances?

cheers

diss
 
The two outstanding issues are

- System locks up when you delete large files.
This is probably from a patching/backport error.

- Any files being written to when the system crashes will be recovered as 0 byte files.
This won't ever be fixed fully.
 
Back
Top Bottom