LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-28-2009, 10:58 PM   #1
schulte3
LQ Newbie
 
Registered: Jan 2009
Posts: 20

Rep: Reputation: 0
Grub boot issue


I am trying to install Backtrack 4 BETA on my USB thumb drive. I have set up two partition, a swap on /dev/sdb1 and the root or main partition(not sure exactly what its referred to as) on /dev/sdb2. It seems the install went ok but I am having trouble configuring GRUB.

I have turned the bootable flag on for /dev/sdb2 and have grub installed on it. The installation of grub went smoothly. I tried configuring the device.map, menu.lst, and /etc/stab files to just boot Backtrack, no dual-boot or anything. I get grub to come up when I boot from my flash drive and I choose to boot into linux it goes for a while and then has an error saying "VFS: Unable to mount root partition" or something similar to that and says that sdb2 is not a valid boot option and then tells me valid options are sda1 or sda2 which are the internal hard drives for the laptop. I have googled this for a while and tried multiple solutions but to no avail.

/etc/fstab:

Code:
/dev/sdb2 / reiserfs defaults 0 0 # AutoUpdate
/dev/sdb1 none swap sw 0 0
proc /proc proc defaults 0 0 # AutoUpdate
sysfs /sys sysfs defaults 0 0 # AutoUpdate
devpts /dev/pts devpts gid=5,mode=620 0 0 # AutoUpdate
tmpfs /dev/shm tmpfs defaults 0 0 # AutoUpdate
menu.lst:

Code:
title Linux
root(hd0,1)
kernel /boot/vmlinuz root=/dev/sdb2
device.map:

Code:
(hd0)   /dev/sdb
Let me know if there is anything else I should post to help me with this problem. Thank you in advance for any advice.

Last edited by schulte3; 05-28-2009 at 10:59 PM.
 
Old 05-28-2009, 11:57 PM   #2
smartboyathome
LQ Newbie
 
Registered: Feb 2007
Posts: 4

Rep: Reputation: 0
Do your BIOS support booting like that? I know that most don't, and you have to install GRUB on the USB drive for it to work.
 
Old 05-29-2009, 06:26 AM   #3
schulte3
LQ Newbie
 
Registered: Jan 2009
Posts: 20

Original Poster
Rep: Reputation: 0
Grub is installed on the USB drive. I configure the boot options in my bios to boot from the USB drive first.
 
Old 05-29-2009, 06:29 AM   #4
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Where is the boot loader installed? On which partition? Is it installed in / or MBR of the drive?
If you install grub on /dev/sdb then you should have a bootable drive with grub.
 
Old 05-29-2009, 06:33 AM   #5
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Boot Loader is installed on the MBR of the hard drive and/or on the boot sector of partitions.
 
Old 05-29-2009, 06:40 AM   #6
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
If it is a thumdrive then why dont you try installing syslinux instead of Grub?
 
Old 05-29-2009, 07:54 AM   #7
schulte3
LQ Newbie
 
Registered: Jan 2009
Posts: 20

Original Poster
Rep: Reputation: 0
What I did was install grub on /dev/sdb. I had sdb2 mounted at /mnt/bt so I did a grub-install --root-directory=/mnt/bt /dev/sdb. I'm still fairly new to all of this so I'm assuming that the MBR is located on sdb2 since sdb1 is just a swap space.

I have only dealt with Lilo and GRUB so far and haven't heard of syslinux before but I'll check it out. Thanks for the advice. I'll let you know how it goes when I get a chance to try it out.
 
Old 05-29-2009, 08:30 AM   #8
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
MBR is the first partition in the drive and it can not reside at /dev/sdb2. It is not. To install it in the MBR you should do grub-install /dev/sdb
 
Old 05-29-2009, 09:03 AM   #9
schulte3
LQ Newbie
 
Registered: Jan 2009
Posts: 20

Original Poster
Rep: Reputation: 0
That was what I did. I still got the error that it cannot mount the root partition.
 
Old 05-29-2009, 09:24 AM   #10
shpenat
Member
 
Registered: Dec 2008
Distribution: LFS
Posts: 95

Rep: Reputation: 21
Good info about booting is here http://wiki.osdev.org/Boot_sequence

You mentioned that booting went good for a while. So when does the error appear? In first stage (uncompressing and setting up kernel), or second stage (setting up processes, mounting filesystems, etc)?
 
Old 05-29-2009, 09:58 AM   #11
schulte3
LQ Newbie
 
Registered: Jan 2009
Posts: 20

Original Poster
Rep: Reputation: 0
Great link, thank you. I'm still in college as a Comp Sci major so some of that stuff is a little overwhelming but I'm learning from it.

I'm pretty certain the error occurs during the second stage of the boot. I can say for certain when I get home from work. With the research I've done it seems my menu.lst, device.map, or /etc/fstab might be configured improperly. Is there anything you can see that would cause a problem with mounting the root partition?

Last edited by schulte3; 05-29-2009 at 09:59 AM.
 
Old 05-29-2009, 11:03 AM   #12
shpenat
Member
 
Registered: Dec 2008
Distribution: LFS
Posts: 95

Rep: Reputation: 21
From what you provided I can think of two possible problems.

1) you specified wrong device. Meaning that /dev/sdb2 us not actually your USB thumb drive. For example on my laptop if I boot (from hdd) with my usb stick inserted it is assigned to /dev/sda. But when I plug it during runtime it goes to /dev/sdb. It is caused by wrongly (or insufficiently) configured udev.

2) I am not familiar with BackTrack linux. Is it designed for USB booting? If not that is most likely where the error is. By the time of mounting filesystem kernel will not have usb modules loaded. So either use distro designed for USB, or modify you initrd accordingly.
 
Old 05-29-2009, 11:08 AM   #13
schulte3
LQ Newbie
 
Registered: Jan 2009
Posts: 20

Original Poster
Rep: Reputation: 0
I can't be sure but from what I've read only Backtrack should be able to be installed to a USB drive. Your first suggestion makes a lot of sense though and I might have mistook the avaiable options it gave me for root= as the internal hard drive but it could be referring to the two USB partitions. I'll try that when I get home and see how it works.
 
Old 05-29-2009, 11:54 AM   #14
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,617

Rep: Reputation: 442Reputation: 442Reputation: 442Reputation: 442Reputation: 442
schulte3:

a)
/etc/fstab:
----/dev/sdb2 / reiserfs defaults 0 0 # AutoUpdate-----

Try change to:
/dev/sdb2 / reiserfs user,auto,rw 0 0

-to eliminate possible unwanted issues re perms and dev

=If above solution does not work, try this next:

b)
/boot/grub/menu.lst

title Linux
root (hd0,1)
kernel /boot/vmlinuz root=/dev/sdb2-----

If you have configured BIOS to ignore the hardisk and boot directly to usb-thumb this should have no problem. However, for curiousity try change the root line: (and also the device.map)

root (hd1,1)
kernel /boot/vmlinuz root=/dev/sdb2

c)
device map

(hd0) /dev/sdb

This entry should have been okay per your configuration.
However, "b)" above, if you test run grub at root (hd1,1) you should also add here-

(hd1) /dev/sdb

=====================

However, please note, that my first conviction tells me that your current problem is not in the mbr nor at grub. It is in the fstab: either user or partition format issue. So you should try a) above first and reboot.

though I could err here, there is of course no guaranty except my earnest will to help. My memory is a bit hazy about grub now.

Are you sure that your distro uses "raiserfs" by default? or was it you who specified it? What if it runs over ext3? or the last time I was on, ext4 was not yet supported in Grub.

Hope this helps.

Goodluck.
 
  


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
Grub dual boot issue jnav Linux - Newbie 15 08-21-2008 03:29 PM
Grub Issue /Fedora / Can still boot neozero62 Linux - General 5 08-03-2007 06:50 PM
Can I do this, GRUB boot issue DB9 Linux - Kernel 2 11-21-2006 10:41 AM
RHEL-First boot Issue-GRUB devinnull Linux - Newbie 7 02-12-2006 08:10 PM
Grub dual boot issue simvan Linux - Newbie 8 06-04-2004 05:13 AM


All times are GMT -5. The time now is 12:47 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration