LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 02-01-2010, 03:31 PM   #1
charlweed
Member
 
Registered: Jan 2005
Posts: 41

Rep: Reputation: 15
Boot from same mapped drive, regardless of USB drive?


The default Fedora (11 anyway) setup configures the root drive as a mapped logical volume. This is now causing me serious headaches.Here is the grub.conf in question:


title Fedora (2.6.30.10-105.2.4.fc11.i686.PAE)
root (hd0,0)
kernel /vmlinuz-2.6.30.10-105.2.4.fc11.i686.PAE ro root=/dev/mapper/vg_trixter-lv_root quiet
initrd /initrd-2.6.30.10-105.2.4.fc11.i686.PAE.img

The problem is that when I boot with a USB drive attached to a port, my system won't boot. It hangs right after the GRUB screen. This surprises me, because I thought that the volume/partition labels would insure the correct operation of the drive mapper, regardless of the drive order provided by the motherboard after POST.

It's a REALLY long story why I need the USB drive attached, but let's just say I do.

So, is there any way to setup the device mapper to find/configure the correct partitions? Or is there some other solution besides removing the USB drive?

Thanks!
 
Old 02-01-2010, 05:12 PM   #2
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by charlweed View Post
Or is there some other solution besides removing the USB drive?
Use a drive label. Read "man e2label".
 
Old 02-01-2010, 07:02 PM   #3
charlweed
Member
 
Registered: Jan 2005
Posts: 41

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by David1357 View Post
Use a drive label. Read "man e2label".
Thanks, but I've spent a few hours trying, and I think e2label is just for filesystems, and that does not seem to help.

Let's say that I labeled my root filesystem
"trixter_root"
and my logical volume root partion is
/dev/mapper/vg_trixter-lv_root


I ran
Code:
e2label /dev/mapper/vg_trixter-lv_root trixter_root
And edited /boot/grub/grub.conf to become
Code:
title Fedora (2.6.30.10-105.2.4.fc11.i686.PAE)
        root (hd0,0)
        kernel /vmlinuz-2.6.30.10-105.2.4.fc11.i686.PAE ro root=LABEL=trixter_root quiet
        initrd /initrd-2.6.30.10-105.2.4.fc11.i686.PAE.img
This still does not work, and I think it's because the LVM itself is breaking, because it's physical volume gets re-ordered when the USB drive is connected at boot time.

If I could identify the physical volume ( currently /dev/sdb2 ) by ID and use that for my logical volume, I think that would be real progress.

I'm wading through the lvm man pages now...
 
Old 02-02-2010, 09:39 AM   #4
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by charlweed View Post
If I could identify the physical volume (currently /dev/sdb2) by ID and use that for my logical volume, I think that would be real progress.
ok. What is the output of "fdisk -l" when you boot with and without the USB drive attached?

I poked around a little yesterday. It looks like GRUB2 might have support for accessing file systems by UUID.

But if your volume mapping gets changed by the addition of the USB drive, I do not know how to solve your problem.
 
Old 02-02-2010, 03:44 PM   #5
charlweed
Member
 
Registered: Jan 2005
Posts: 41

Original Poster
Rep: Reputation: 15
If the USB drive is plugged in, it won't boot at all. So I can't run fdisk.

I now think this is some nasty, wicked, EVIL interaction between my kernel
(2.6.30.10-105.2.4.fc11.i686.PAE) and my motherboard (P4C800-E).

GRUB loads, and I have used the grub command line to verify that verify that
root (hd0,0) works
and that grub can "find" /vmlinuz-2.6.30.10-105.2.4.fc11.i686.PAE and /initrd-2.6.30.10-105.2.4.fc11.i686.PAE.img

When I boot from grub, without quiet, the console shows the typical initial log messages before the "Welcome to Fedora" message, but then it hangs. The welcome never shows.
No errors, no nothing.

I've tried a few kernel arguments, nousb, debug, but this is not going anywhere.
 
Old 02-02-2010, 03:58 PM   #6
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by charlweed View Post
If the USB drive is plugged in, it won't boot at all. So I can't run fdisk.
Can you boot from a LiveCD or System Rescue CD with the USB drive plugged in and then run "fdisk -l"?
 
Old 02-02-2010, 04:11 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,969

Rep: Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752
I assume the computer is set to boot off the internal drive first. What is on the USB drive and how is it partitioned? If it contains a LVM partition with the same volume name as the internal drive then this could be the problem.
 
Old 02-02-2010, 04:20 PM   #8
charlweed
Member
 
Registered: Jan 2005
Posts: 41

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by michaelk View Post
I assume the computer is set to boot off the internal drive first. What is on the USB drive and how is it partitioned? If it contains a LVM partition with the same volume name as the internal drive then this could be the problem.
It's a fat32 with jpegs on it. Please don't ask.

If I plug in the drive after the Fedora welcome message, it boots fine.
In that case, here is the output from blkid
Code:
/dev/sdf1 vfat   garage  (not mounted) BEA2-DC2E
The label is garage, and the UUID is BEA2-DC2E

I'll try a livecd when I burn one.
 
Old 02-26-2010, 12:27 PM   #9
charlweed
Member
 
Registered: Jan 2005
Posts: 41

Original Poster
Rep: Reputation: 15
Solved

Once or twice a year, I run into a computer problem that just seems… unreasonable. A case too unusual to anticipate, or diagnose. When I finally find a solution, there is no satisfaction, instead I’m left with just a feeling of sick contempt for the entire world of information technology. This was that kind of problem.

The issue had nothing to do with drive mapping, or boot order. The “hang at boot” problem is only with this particular make-model of USB stick, and only on Linux, and only at the stage where execution is handed to the kernel.

After boot, these USB sticks work fine. Also, I had tested them on other machines, and they had booted fine into Windows and MacOS. I had tried different USB sticks, but they were the same make and model, and failed in the same way. They even hung on booting from a live dvd.
Actually, I don’t know if these sticks are really incompatible with Linux or GRUB, or even if it is some weird interaction with the ASUS P4P800 motherboard. But now I’ve tried several completely different USB sticks, and they have all worked.

We bought these USB sticks in bulk, so I don’t know who the manufacturer is, but the incompatible model is

“Ut 161 USB2FlashStorage USB Device”

USBSTOR\DiskUt161___USB2FlashStorage0.00
USBSTOR\DiskUt161___USB2FlashStorage
USBSTOR\DiskUt161___
USBSTOR\Ut161___USB2FlashStorage0
Ut161___USB2FlashStorage0
USBSTOR\GenDisk
GenDisk
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
using GRUB 1.5 with boot on sata-drive and system on usb drive(ipod photo) Scorp-D Linux - Laptop and Netbook 1 03-16-2007 02:34 AM
mapped drive problems neocontrol Linux - Networking 1 05-02-2006 01:28 AM
Mapped Drive Timeout KrGAce Linux - Newbie 4 01-08-2005 07:43 PM
Mapped Drive Time out KrGAce Linux - Enterprise 0 12-06-2004 07:17 AM
Samba - XP Mapped Drive Problem tkman Linux - General 1 12-10-2003 06:37 PM


All times are GMT -5. The time now is 04:45 AM.

Main Menu
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