LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-05-2011, 09:53 PM   #1
pisti
Member
 
Registered: Jul 2006
Location: Montréal, Canada
Distribution: Slackware
Posts: 258

Rep: Reputation: 33
disk device order gets scrambled at boot time with 3Ware controllers


i am plagued for years with this problem : the order of harddisks get scrambled at boot time and the proper boot partitions are not found. i experience this with 3ware raid cards (8000m 9500, 9550, 9650) in combination with older and newer SuperMicro server motherboards and now recently also with old RioWorks AMD server boards. i simply want to keep my boot partitions on the first SATA (at times also PATA) disk, that's /dev/sda that usually runs on a separate controller (SATA or PATA) on the motherboard. of course as soon as another device (a 'unit' created through the 3ware RAID controller and presented as a /dev/sdX) is added or removed my original boot partition /dev/sda1 is nowhere to find --> kernel panic (unless i do all kind of acrobatics changing names in fstab and such).

this happened to me with recent 13.37 64bit slackware but also with older versions back to v12.0.

lilo or grup options like root=/dev/sda1 and similar don't do a thing. changing BIOS settings has no influence either.

how do i control this damned device order? what is the right syntax in the /etc/udev files for kernel version 2.6.37 and slack 13.37 ?

any input GREATLY appreciated! bye, pisti
 
Old 08-06-2011, 12:18 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,140

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
You need to use something invariant - UUID or LABEL are popular with mega-distros like Ubuntu or Redhat. Grub needs to be patched to support that - don't know if slack has that, or anything about lilo. Grub2 has the support in-built.
Another option is to use by-id or by-path - in fstab, not any boot-loader I'm aware of.
 
Old 08-06-2011, 10:51 PM   #3
pisti
Member
 
Registered: Jul 2006
Location: Montréal, Canada
Distribution: Slackware
Posts: 258

Original Poster
Rep: Reputation: 33
thanks for the reply, syg00, i saw your name a few times googling up while looking into this problem.

anyway, still being a big problem : as soon as i populate the two 3ware 9500 cards with SATA disks the boot order gets confused - panic. now, i started to play around with UUID etc, but no success, and i start to believe that's a kernel a/o Slackware problem. here my system :

Slackware 13.37 64bit using original kernel vmlinuz-huge-2.6.37.6.


/etc/fstab with UUID for /dev/sda1 entry works fine :

/dev/disk/by-uuid/758c22ed-8672-40aa-95c2-a8bd2958bd3e / xfs defaults 1 1


/etc/lilo.conf : as soon as i include the UUID the boot process goes havoc but works fine with /dev/sda1 (and with no 3ware disks installed!):

boot = /dev/sda
append=" vt.default_utf8=1"
prompt
timeout = 50
vga = 791
image = /boot/vmlinuz
# addappend=" nodmraid raid=noautodetect"
# addappend="root=/dev/disk/by-uuid/758c22ed-8672-40aa-95c2-a8bd2958bd3e"
# append="root=/dev/disk/by-uuid/758c22ed-8672-40aa-95c2-a8bd2958bd3e"
# append="root=UUID=758c22ed-8672-40aa-95c2-a8bd2958bd3e"
root = /dev/sda1
label = linux
read-only # Partitions should be mounted read-only for checking

as you see, i played for hours with various append options. but i didn't try yet creating an initrd, i thought it will not be necessary. i also didn't play with LABEL because that wants initrd to my knowledge. here the kernel boot output (my handwritten notes on paper) before freezing and blinking with the CapsLock and ScrollLock:

VFS: Cannot open root device "disk/by-uuid/758c22ed-8672-40aa-95c2-a8bd2958bd3e" or unknown device (0,0)
Please append a correct "root=" boot option; here are the available partitions:
0800 ... sda ... sd
0801 sda1 .... 00000000-0000-0000-0000-000000000000
0802 .....
Kernel panic - not syncing : VFS: unable to mount root for an unknown-block (0,0) (or similar text...)


now, i hope the problem does not come form using a PATA system disk WD2500JB...? see all the zeros above ?

anyway, what to do next? any suggestions? i need to get these three fairly old Rioworks servers running (all dual AMD, dual 3ware 9500-8 cards, and with 16x SATA disks). thanks much! bye, pisti
 
Old 08-07-2011, 12:11 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,140

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
To use anything "esoteric" on the boot "root=" parameter you're going to need support somewhere - either in the loader itself, or in an initrd to resolve the device specification prior to doing the pivot_root.
I don't use lilo or initrd (unless forced) so I can't help you there. As I said, classic grub has (out of tree) patches available to use UUID and/or LABEL - grub2 supports (defaults now IIRC) UUID natively. No idea about lilo support - last I looked at lilo was last millennium.

If devices change nomenclature prior to the kernel mounting the root, I'd reckon the BIOS is presenting them differently. Easy enough to get into command mode in grub to figure that out - hopefully you don't need to do that too often. udev rules would be invoked in the init scripts - much too late for you.
If lilo hasn't/can't be patched to support UUID/LABEL, I'd go with grub2. Don't know if Slack has a package available - been a while since I bothered looking at Slack.
 
Old 08-07-2011, 02:04 AM   #5
pisti
Member
 
Registered: Jul 2006
Location: Montréal, Canada
Distribution: Slackware
Posts: 258

Original Poster
Rep: Reputation: 33
the only reason i left grub, which i used since v.05.nn, was that i couldn't get it running at 64bit. now, looking at grub2, you do encourage me to go back to grub which i definitely preferred. still, LABEL and UUID should be well supported by lilo as well. because i saw these days many google entries with the very same boot issue i experience i start to believe the problem is elsewhere. anyway, tomorrow i shall give a shot at grub2...slackbuilds offers a package.
 
Old 08-08-2011, 10:34 AM   #6
pisti
Member
 
Registered: Jul 2006
Location: Montréal, Canada
Distribution: Slackware
Posts: 258

Original Poster
Rep: Reputation: 33
so, problem solved, all machines boot now on /dev/sda1, all IDE/SATA/RAID controllers follow the expected order. post-hoc everything looks very simple, right? LABEL and UUID need initrd! here my cookbook entries which surely will look similar/or even identical to other people's notes. again, scenario is Slackware 13.37 usually 64bit, running on a bunch of servers with RAID5/6s and workstations with local RAID0s.

- blkid
--> /dev/sda1: UUID="758c22ed-8672-40aa-95c2-a8bd2958bd3e" TYPE="xfs"

- /usr/share/mkinitrd/mkinitrd_command_generator.sh
--> mkinitrd -c -k 2.6.37.6 -f xfs -r /dev/disk/by-uuid/758c22ed-8672-40aa-95c2-a8bd2958bd3e -m exportfs:xfs -u -o /boot/initrd.gz

- /etc/fstab :
--> /dev/disk/by-uuid/758c22ed-8672-40aa-95c2-a8bd2958bd3e / xfs defaults 1 1
--> #/dev/sda1 / xfs defaults 1 1

- /etc/lilo.conf :
boot = /dev/sda
append=" vt.default_utf8=1"
prompt
timeout = 50
vga = 791
image = /boot/vmlinuz-generic-2.6.37.6
label = initrd_uuid
initrd = /boot/initrd.gz
append="root=UUID=758c22ed-8672-40aa-95c2-a8bd2958bd3e"
read-only
image = /boot/vmlinuz
label = linux
root = /dev/sda1
read-only

- lilo
Warning: LBA32 addressing assumed
Added initrd_uuid *
Added linux
1 warning was issued.

so, we are all set - i just don't know how to mark this thread as SOLVED ? thanks for the suggestions above.
 
  


Reply



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
Set order of HDD controllers kripz Linux - Hardware 1 05-05-2010 09:11 AM
WARNING! 3ware controllers break SUSPEND. brianpbarnes Linux - Software 6 06-15-2009 03:32 PM
SAN LUN disk device order jhumeston Linux - Software 1 07-28-2004 06:02 PM
Rearrange device order in boot up 3DZign Linux - Laptop and Netbook 1 03-27-2004 08:09 PM
USB controllers get deregistered at boot time gary.chan Linux - Hardware 0 08-16-2003 11:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:49 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
Open Source Consulting | Domain Registration