This is a discussion on no boot sector on usb drive within the Linux Operating System forums, part of the Unix Operating Systems category; --> I've installed Centos 5.1 Linux to a USB drive and have set my laptop to boot from the USB ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I've installed Centos 5.1 Linux to a USB drive and have set my laptop to boot from the USB port. When I select the USB Drive as the boot device it displays "No Boot Sector on USB Drive" then procedes to boot from my internal HD with WinXP. Does anyone know how I get a boot sector on my usb drive? I thought the linux installation would of placed one on it, it was also suppose to install the grub loader. Thanks, Pete |
| |||
| On 2008-06-28, Peter <petercritic@yahoo.com> wrote: > > > I've installed Centos 5.1 Linux to a USB drive and have set my laptop > to boot from the USB port. When I select the USB Drive as the boot > device it displays "No Boot Sector on USB Drive" then procedes to boot > from my internal HD with WinXP. Does anyone know how I get a boot > sector on my usb drive? I thought the linux installation would of > placed one on it, it was also suppose to install the grub loader. > > Thanks, > Pete Assuming the USB drive is /dev/sda, did you install Centos on /dev/sda or /dev/sda1 ? What is the result of the command "sudo fdisk -l /dev/sda" ? |
| |||
| On Jun 28, 5:50 am, Bill Marcum <marcumb...@bellsouth.net> wrote: > Assuming the USB drive is /dev/sda, did you install Centos on /dev/sda > or /dev/sda1 ? What is the result of the command > "sudo fdisk -l /dev/sda" ? I'm trying to run that command but the only linux I have access to is the SystemRescue CD and the Centos Live CD. I'm not able to find fdisk but here is some information I found out when I ran gparted on the systemrescue cd. /dev/sdb2 / ext3 contains around 3.7 gigs of information /dev/sdb3 swap /dev/sdb1 ntfs contains my xp installation when I was running the centos live cd I was able to cd the contents of sdb2 so I know the installation did something. Ok I found fdisk at / mnt/disc/sda2/sbin/fdisk but when I try running your command it says sudo: fdisk: command not found Chris |
| |||
| On Jun 28, 5:50 am, Bill Marcum <marcumb...@bellsouth.net> wrote: > Assuming the USB drive is /dev/sda, did you install Centos on /dev/sda > or /dev/sda1 ? What is the result of the command > "sudo fdisk -l /dev/sda" ? I'm trying to run that command but the only linux I have access to is the SystemRescue CD and the Centos Live CD. I'm not able to find fdisk but here is some information I found out when I ran gparted on the systemrescue cd. /dev/sdb2 / ext3 contains around 3.7 gigs of information /dev/sdb3 swap /dev/sdb1 ntfs contains my xp installation when I was running the centos live cd I was able to cd the contents of sdb2 so I know the installation did something. Ok I found fdisk at / mnt/disc/sda2/sbin/fdisk but when I try running your command it says sudo: fdisk: command not found |
| |||
| Peter wrote: > On Jun 28, 5:50 am, Bill Marcum <marcumb...@bellsouth.net> wrote: >> Assuming the USB drive is /dev/sda, did you install Centos on /dev/sda >> or /dev/sda1 ? What is the result of the command >> "sudo fdisk -l /dev/sda" ? > > I'm trying to run that command but the only linux I have access to is > the SystemRescue CD and the Centos Live CD. I'm not able to find > fdisk but here is some information I found out when I ran gparted on > the systemrescue cd. > > /dev/sdb2 / ext3 contains around 3.7 gigs of > information > /dev/sdb3 swap > /dev/sdb1 ntfs contains my xp installation > > when I was running the centos live cd I was able to cd the contents of > sdb2 so I know the installation did something. Ok I found fdisk at / > mnt/disc/sda2/sbin/fdisk but when I try running your command it says > sudo: fdisk: command not found > > Chris > > > /mnt/disc/sda2/sbin/ isn't in your path so to run that instance of fdisk you have to type '/mnt/disc/sda2/sbin/fdisk' instead of just 'fdisk'. |
| |||
| Ok I got a little closer. I deleted all the partitions on the usb drive and re-installed Centos and it worked. But it overwrote the master boot record on drive C on my internal drive. I finally got XP working again using fixmbr command but when I select the usb drive it won't boot. So its not accessing the GRUB program so maybe its not in the right location on the USB drive. Is there a program or command I can run on the USB drive that would run the GRUB program on the USB drive without touching the master boot record on my internal drive? right now I'm using the live cd for centos. Thanks |
| |||
| On Tue, 01 Jul 2008 21:31:45 -0700, Peter wrote: > Ok I got a little closer. I deleted all the partitions on the usb drive > and re-installed Centos and it worked. But it overwrote the master boot > record on drive C on my internal drive. I finally got XP working again > using fixmbr command but when I select the usb drive it won't boot. So > its not accessing the GRUB program so maybe its not in the right location > on the USB drive. Is there a program or command I can run on the USB > drive that would run the GRUB program on the USB drive without touching > the master boot record on my internal drive? right now I'm using the live > cd for centos. > > Thanks From the live CD, open a terminal as root, or su to root. At the prompt enter; # grub <Enter> You'll get: GNU GRUB version 0.97 (640K lower / 3072K upper memory) [ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename. ] grub> At the grub prompt; grub> find /boot/grub/stage2 <Enter> I get; grub> find /boot/grub/stage2 (hd0,0) (hd0,4) (hd0,5) (hd0,6) (hd1,0) (hd1,2) (hd1,4) (hd3,0) (hd5,0) (hd5,6) These are all the places where /boot/grub/stage2 exist: The / partitions of all of the installed Linux versions on the machine. The USB drive is (hd5) and I want the master grub to be the one on (hd5,0) grub> root (hd5,0) <Enter> Filesystem type is ext2fs, partition type 0x83 I will want the grub installation in the MBR of the USB drive so I enter; grub> setup (hd5) <Enter> Checking if "/boot/grub/stage1" exists... yes Checking if "/boot/grub/stage2" exists... yes Checking if "/boot/grub/e2fs_stage1_5" exists... yes Running "embed /boot/grub/e2fs_stage1_5 (hd5)"... 15 sectors are embedded. succeeded Running "install /boot/grub/stage1 (hd5) (hd5)1+15 p (hd5,0)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded Done. grub> Grub is installed properly, as shown by the output of the last command, so I next enter; grub> quit <Enter> and grub closes leaving me at the prompt. # You will have to choose which / partition to use, if you have more than one Linux installation. If you only have the one on the USB drive then only one will be found. Whatever the drive/partition reported use it for the root command, then just the drive part for the setup command. Use the above as a pattern, with your own results for the actual entries. When you choose to boot to the USB drive, BIOS will change it's designation to (hd0). The boot drive is always (hd0). You will need to edit your /boot/grub/grub.conf to show the / partition as (hd0,n) where n is the actual partition number, for all kernel and initrd entries. -- old-polack Of what use be there for joy, if not for the sharing thereof? |
| ||||
| Hi Peter, forget GRUB, I think it is not possible to boot from a USB Stick using it. I had the same problem. I solved it, using SYSLINUX as the bootloader. Create a FAT16 boot partition on your Stick, and follow the instructions on the project homepage. Regards, Thomas Peter schrieb: > Ok I got a little closer. I deleted all the partitions on the usb > drive and re-installed Centos and it worked. But it overwrote the > master boot record on drive C on my internal drive. I finally got XP > working again using fixmbr command but when I select the usb drive it > won't boot. So its not accessing the GRUB program so maybe its not in > the right location on the USB drive. Is there a program or command I > can run on the USB drive that would run the GRUB program on the USB > drive without touching the master boot record on my internal drive? > right now I'm using the live cd for centos. > > Thanks > |