Unix Technical Forum

no boot sector on usb drive

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 ...


Go Back   Unix Technical Forum > Unix Operating Systems > Linux Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-28-2008, 09:20 AM
Peter
 
Posts: n/a
Default no boot sector on usb drive

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-29-2008, 08:46 AM
Bill Marcum
 
Posts: n/a
Default Re: no boot sector on usb drive

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" ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-29-2008, 08:46 AM
Peter
 
Posts: n/a
Default Re: no boot sector on usb drive

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



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 06-29-2008, 08:46 AM
Peter
 
Posts: n/a
Default Re: no boot sector on usb drive

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 06-29-2008, 08:46 AM
Brandon McCombs
 
Posts: n/a
Default Re: no boot sector on usb drive

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'.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 07-02-2008, 05:10 AM
Peter
 
Posts: n/a
Default Re: no boot sector on usb drive

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 07-14-2008, 05:38 PM
old-polack
 
Posts: n/a
Default Re: no boot sector on usb drive

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?


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 07-14-2008, 05:38 PM
ps
 
Posts: n/a
Default Re: no boot sector on usb drive

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
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:02 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com