I need to install GRUB on my USB-drive. I’ve gone through variety of manuals and articles but I have strange errors during install.
No am I going to show my way of installing GRUB. Please write me if I made something wrong.
- Insert USB in my laptop.
- My OpenSUSE automatically mount an USB-drive, so I unmount it
- Format USB-drive into ext3
mkfs -t ext3 /dev/sdb mke2fs 1.41.1 (01-Sep-2008) /dev/sdb is entire device, not just one partition! Proceed anyway? (y,n) y Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 250976 inodes, 1003519 blocks 50175 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=1027604480 31 block groups 32768 blocks per group, 32768 fragments per group 8096 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736 Writing inode tables: done Creating journal (16384 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 30 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override.
- Mount my USB-drive to /mnt
mount -t ext3 /dev/sdb /mnt
- Create /boot/grub directory
cd /mnt mkdir boot cd boot mkdir grub
- Copy files device.map, menu.lst, stage1, stage2 and e2fs_stage1_5 to /mnt/boot/grub
- Unmount USB drive
cd / umount /mnt
- Start grub and write:
grub> device (hd0) /dev/sdb device (hd0) /dev/sdb
- Then I try set root directory:
grub> root (hd0,0) root (hd0,0) Error 5: Partition table invalid or corrupt
Why do I receive this error? How can I fix it?