Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.


  Search this Thread
Old 07-26-2009, 02:03 PM   #1
Registered: Sep 2007
Posts: 169

Rep: Reputation: 23
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/
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 ?
My embedded PC has only one compact flash disk (probably hd0).

Old 07-29-2009, 03:47 AM   #2
Registered: Jul 2009
Posts: 51

Rep: Reputation: 15
maybe you can use unetbootln or syslinux...
Old 07-29-2009, 02:29 PM   #3
Registered: Sep 2007
Posts: 169

Original Poster
Rep: Reputation: 23
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.
Old 07-29-2009, 02:32 PM   #4
LQ Guru
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Rep: Reputation: 338Reputation: 338Reputation: 338Reputation: 338
You forgot, or didn't know, to add

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

/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?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't Get Linux to Boot from USB Hard Disk BcopanelPuppy Linux - Newbie 15 07-27-2009 04:50 PM
Install grub on a USB hard disk (not disk on key) zvivered Linux - Embedded & Single-board computer 4 07-22-2009 10:30 PM
Adding second hard disk with windows to boot with grub on first hard disk rushadrenaline Linux - Hardware 3 07-08-2009 04:39 AM
Boot from hard disk leads only to GRUB AGHH! SlowMindThinkin Linux - Newbie 10 11-08-2004 10:19 AM
Creating Boot loader disks rather then installing GRUB to hard disk?? barry237 Fedora 1 06-19-2004 10:52 AM > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration