How to make bootable partion on USB drive to install GRUB...
Linux From ScratchThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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...
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...
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
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
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.