LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 07-26-2009, 02:03 PM   #1
zvivered
Member
 
Registered: Sep 2007
Posts: 294

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/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.
 
Old 07-29-2009, 03:47 AM   #2
bianchi77
Member
 
Registered: Jul 2009
Posts: 51

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

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
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
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?
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 08:31 PM.

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