LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices

Reply
 
Search this Thread
Old 03-09-2010, 04:20 AM   #1
psmurthy
LQ Newbie
 
Registered: Mar 2010
Posts: 11

Rep: Reputation: 0
How to make bootable partion on USB drive to install GRUB...


Hi,
I made a partion on USB drive using Gpart utiliy and installed GRUB on it.
USB doesn't have any thing else
When i change my BIOS settings to boot from USB, nothing is comming..
Do we need to do anything to make one partion bootable...
Appreciate any help on this one...
 
Old 03-09-2010, 04:33 AM   #2
giammy
Member
 
Registered: Feb 2010
Posts: 36

Rep: Reputation: 20
Quote:
Originally Posted by psmurthy View Post
Hi,
I made a partion on USB drive using Gpart utiliy and installed GRUB on it.
USB doesn't have any thing else
When i change my BIOS settings to boot from USB, nothing is comming..
Do we need to do anything to make one partion bootable...
Appreciate any help on this one...
Hi,

to make a bootable usb drive, I use Unetbootin
http://unetbootin.sourceforge.net/

bye
giammy
 
Old 03-12-2010, 02:09 PM   #3
psmurthy
LQ Newbie
 
Registered: Mar 2010
Posts: 11

Original Poster
Rep: Reputation: 0
Things i did to achieve my goal

I have 300 GB USB drive and I did following things to boot GRUB from this.
1. Using gparted prtitioned USB into 3
Frist Partition - 1GB
Second Partition - 101GB
Third Partition - 195GB
All are ext3 partitions
2. "fdsik -l" output
====================================================================
Disk /dev/sda: 250.0 GB, 250000000000 bytes
255 heads, 63 sectors/track, 30394 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xa586a586
[/COLOR]
Device Boot Start End Blocks Id System
/dev/sda1 * 1 30021 241143651 83 Linux
/dev/sda2 30022 30394 2996122+ 5 Extended
/dev/sda5 30022 30394 2996091 82 Linux swap / Solaris

Disk /dev/sdc: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00066f97

Device Boot Start End Blocks Id System
/dev/sdc1 1 131 1052226 83 Linux
/dev/sdc2 132 13417 106719795 83 Linux
/dev/sdc3 13418 38913 204796620 83 Linux

===================================================================
3. Created directory with name "boot" on partition 1. In boot directory another directory with name "grub" is created.
4. Copied grub files from booted os to grub directory.

Files copied are

1.stage1
2.stage2
3.device.map
4.default
5.e2fs_stage1_5
6.jfs_stage1_5
7.minix_stage1_5
8.fat_stage1_5
9.menu.lst
10.reiserfs_stage1_5
11.xfs_stage1_5
12.installed-version
(other partitions have no data or any OS, I just want to try from scratch and started with aim of booting GRUB)
5. device.map file has following contents
(hd0) /dev/sda
(hd1) /dev/sdb
6. make the grub bootable using following process
grub>root (hd0,0)
grub>setup (hd0,0)
grub>quit

7. Now i reload the PC(disconnected main sata hard disk),stop BIOS<F12>, select to boot from USB.

Here i am expecting boot GRUB from USB drive with giving message something like
booting GRUB...
But its not happening in my case and stopped after quit from BIOS.

Can someone please help me in understanding basics.

Last edited by psmurthy; 03-12-2010 at 02:12 PM. Reason: Forgot to mention about my intention for trying all these things
 
Old 03-12-2010, 05:03 PM   #4
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,604

Rep: Reputation: 446Reputation: 446Reputation: 446Reputation: 446Reputation: 446
Hi,

have you ever booted from a USB partition? I recall, that I once had a PC which just would not boot from USB, even though this option was supported according to BIOS. So maybe your PC just might not support this option.

Quote:
3. Created directory with name "boot" on partition 1. In boot directory another directory with name "grub" is created.
On your USB-drive I guess?
Quote:
6. make the grub bootable using following process
grub>root (hd0,0)
grub>setup (hd0,0)
grub>quit
Aren't you setting up a boot partition on your primary drive with this commands? If you want to make your USB-partition bootable I would suspect that you might have to do something like
Code:
grub>root (hd2,0)
grub>setup (hd2,0)
grub>quit
I. e., if your USB-drive is sdc.
 
Old 03-13-2010, 04:30 AM   #5
psmurthy
LQ Newbie
 
Registered: Mar 2010
Posts: 11

Original Poster
Rep: Reputation: 0
Hi Crts,

First of all Thanks for your reply.
1. I created boot and grub partition on USB drive.
2. You suggested following steps
grub>root (hd2,0)
grub>setup (hd2,0)
grub>quit

But i dont have hd2 disk . i have hd0(main hard disk), hd1(USB drive)
But why i used hd0 is after reboot i am disconnecting main sata hard disk.
So then USB will become hd0. This is just my understanding.

Appreciate all your help.
 
Old 03-13-2010, 09:54 AM   #6
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,604

Rep: Reputation: 446Reputation: 446Reputation: 446Reputation: 446Reputation: 446
Quote:
Originally Posted by psmurthy View Post
Hi Crts,

First of all Thanks for your reply.
1. I created boot and grub partition on USB drive.
2. You suggested following steps
grub>root (hd2,0)
grub>setup (hd2,0)
grub>quit

But i dont have hd2 disk . i have hd0(main hard disk), hd1(USB drive)
But why i used hd0 is after reboot i am disconnecting main sata hard disk.
So then USB will become hd0. This is just my understanding.

Appreciate all your help.
OK,

but when you run grub your sata-disk is still hd0 and your usb-drive is at that point hd1. Since your listing in previous post listed only sda and sdc as hdd-devices, I thought your usb is hd2. So if this is not the case you might want to try to run grub with (hd1,0).

BTW, I do not understand why you disconnect your sata. If you set your USB-drive as primary boot device in your BIOS this should not be necessary.
 
Old 03-14-2010, 09:04 AM   #7
psmurthy
LQ Newbie
 
Registered: Mar 2010
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks a lot. Its working for me.
The reason for disconnecting my sata hard disk is my pc is not recognizing
both USB and stat device at the same time.
 
Old 03-14-2010, 12:24 PM   #8
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,604

Rep: Reputation: 446Reputation: 446Reputation: 446Reputation: 446Reputation: 446
Quote:
Originally Posted by psmurthy View Post
Thanks a lot. Its working for me.
The reason for disconnecting my sata hard disk is my pc is not recognizing
both USB and stat device at the same time.
Hi,

if it is working now then please mark the thread as solved.
 
  


Reply


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
make a USB drive bootable cccc Linux - General 2 10-26-2008 12:23 AM
How to make a bootable USB disk using GRUB? math_physics Linux - Hardware 2 07-16-2007 10:42 PM
How do you make a usb drive bootable? comcastuser Linux - General 4 06-25-2007 03:19 AM
Make usb hard drive bootable jmdlcar Slackware 5 08-06-2006 04:27 AM
can you make a usb drive bootable? citrus Linux - Newbie 4 05-16-2004 05:00 AM


All times are GMT -5. The time now is 08:12 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration