LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   Boot embedded PC from a USB hard disk using grub (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/boot-embedded-pc-from-a-usb-hard-disk-using-grub-742945/)

zvivered 07-26-2009 02:03 PM

Boot embedded PC from a USB hard disk using grub
 
This is the procedure I used to install grub 0.97 on a USB disk using a desktop PC running RHEL:

The disk device is: /dev/sdb
I created a primary partition called: /dev/sdb1
This partition was marked as boot.

1. mke2fs /dev/sdb1
2. mount -t ext2 /dev/sdb1 /mnt
3. /sbin/grub/grub-install --root-directory=/mnt /dev/sdb1
4. umount /mnt

Then I got:
Installation finished. No error reported.
This is the contents of the device map /mnt/boot/grub/device.map
Check is this is correct or not. If any of the lines is incorrect, fix it and re-run the script 'grub-install'

(fd0) /dev/fd0
(hd0) /dev/sda
(hd1) /dev/sdb

Then I connected the disk to my embedded target (x86 pc).
On the bios I chose to boot from the USB disk.
I got a blinked cursor. Nothing else.

What am I doing wrong ? Should I fix device.map ?
My embedded PC has only one compact flash disk (probably hd0).

Thanks.

bianchi77 07-29-2009 03:47 AM

maybe you can use unetbootln or syslinux...

zvivered 07-29-2009 02:29 PM

Solution: device parameter in grub-install is wrong
 
The device in grub-install should be /dev/sdb (were the mbr is written)and not /dev/sdb1.

linus72 07-29-2009 02:32 PM

You forgot, or didn't know, to add

"/dev/sdb" to end of grub-install

Quote:

/sbin/grub/grub-install --root-directory=/mnt /dev/sdb1 /dev/sdb
see if that works?

also, are you sure there is a menu.lst in there?


All times are GMT -5. The time now is 07:56 PM.