LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-03-2011, 09:27 PM   #1
Dr.Thodt
LQ Newbie
 
Registered: Dec 2011
Location: Canada
Distribution: slackware
Posts: 20

Rep: Reputation: Disabled
running slackware 13.37 off usb with LUKS and lvm with grub


Hey guys. I'm trying to run slackware off a usb thumbdrive, using luks and lvm using information mostly from README_CRYPT.TXT, some blog
from SlackBlogs, as well as google (mostly gentoo forums)
I need to use grub from slackware/testing (grub-0.97-i486-9) to boot (and a initrd), as lilo complains about usb not being harddisk0.
I am using kernel 2.6.37.6-smp.

This is the drive, seen by fdisk:
Disk /dev/sdc: 8021 MB, 8021606400 bytes
16 heads, 48 sectors/track, 20400 cylinders, total 15667200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000dfd14
Device Boot Start End Blocks Id System
/dev/sdc1 * 62 199081 99510 83 Linux
/dev/sdc2 199082 15667199 7734059 8e Linux LVM

Part of my fstab look like this:
/dev/rally2cryptvg/swap /swap swap defaults 0 0
/dev/rally2cryptvg/root / ext4 defaults 1 1
/dev/rally2cryptvg/home /home ext4 defaults 1 2
/dev/sdc1 /boot ext4 defaults 1 2

My grub menu.lst is:
# GRUB configuration file '/boot/grub/menu.lst'.
# generated by 'grubconfig'. Sat Nov 26 13:48:51 2011
#
# The backup copy of the MBR for drive '/dev/sdc' is
# here '/boot/grub/mbr.sdc.1574'. You can restore it like this.
# dd if=mbr.sdc.1574 of=/dev/sdc bs=512 count=1
#
# Start GRUB global section
#timeout 30
resume= /dev/cryptvg/swap (really not sure where or how to put this in grub, or even if its needed)
#color light-gray/blue black/light-gray
# End GRUB global section
# Linux bootable partition config begins
title wtf on (/dev/sdc1)
root (hd0,0)
kernel /boot/vmlinuz-huge-smp-2.6.37.6-smp rootdelay=20 root=/dev/rally2crypt/root ro vga=794
initrd /boot/initrd.gz
# Linux bootable partition config ends
title --- For help press 'c', type: 'help'
root (hd0)
title --- For usage examples, type: 'cat /boot/grub/grub.txt'
root (hd0)

In my boot/initrd-tree/init I needed to add 'sleep 10' to get the usb keyboard working so that I can enter luks passphrase.

After installing the system I did a chroot /mnt, then ran /usr/share/mkinitrd/mkinitrd_command_generator.sh -r
This is the line it gave me:
mkinitrd -c -k 2.6.37.6-smp -f ext4 -r /dev/rally2cryptvg/root -m usb-storage:ehci-hcd:usbhid:xhci-hcd:jbd2:mbcache:ext4 -C /dev/sdc2 -L -u -o /boot/initrd.gz
the only thing I added to this was: (for hibernation support)
-h /dev/rally2cryptvg/swap
mkinitrd created the initrd.gz and it listed all the modules as O.K.
Now when I boot, here is some of what I see:
...
...
/boot/initrd.gz: Loading kernel modules from initrd image:
usb_storage:exports duplicate symbol usb_stor_sense_invalid CDB (owned by kernel)
usb 4-1: new full speed USB device using ohci_hcd and address 2
modprobe: can't load module usb-storage (kernel/drivers/usb/storage/usb-storage.ko): invalid module format
ehci_hcd: module is already loaded
modprobe: can't load module ehci-hcd (kernel/drivers/usb/host/ehci-hcd.ko): Invalid argument
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
xhci_hcd: module is already loaded
modprobe: can't load module xhci-hcd (kernel/drivers/usb/host/xhci-hcd.ko): Invalid argument
jbd2: exports duplicate symbol jbd_journel_restart (owned by kernel)
modprobe: can't load module jbd2 (kernel/fs/jbd2/jbd2.ko): Invalid module format
mbcache: exports duplicate symbol mb_cache_entry_find_next (owned by kernel)
modprobe: can't load module mbcache (kernel/fs/mbcache.ko): Invalid module format
jbd2: exports duplicate symbol jbd_journel_restart (owned by kernel)
modprobe: can't load module jbd2 (kernel/fs/jbd2/jbd2.ko): Invalid module format
...
...
Unlocking LUKS encrypted device '/dev/sdc2' as luks mapped device 'lukssdc2'
Enter passphrase for /dev/sdc2:
semid 32768: semop failed for cookie 0xd4d109b: incorrect semaphore state
Failed to set a proper state for notification semaphore identified by cookie value 223154331 (0xd4d109b) to initialize waiting for incoming notifications
3 logical volume(s) in volume group "rally2cryptvg" now active
Trying to resume from ../dm-1
ls: ../dm-1: No such file or directory
mount: mounting /dev/rally2crypt-root on /mnt failed: No such file or directory
ERROR: No /sbin/init found on rootdev (or not mounted) Trouble ahead.
You can try to fix it. Type 'exit' when things are done.
... shortly followed by kernel panic

Any help would be greatly appreciated.
 
Old 12-05-2011, 11:51 AM   #2
GazL
LQ Veteran
 
Registered: May 2008
Posts: 5,849

Rep: Reputation: 3786Reputation: 3786Reputation: 3786Reputation: 3786Reputation: 3786Reputation: 3786Reputation: 3786Reputation: 3786Reputation: 3786Reputation: 3786Reputation: 3786
Volume group name mismatch:

resume= /dev/cryptvg/swap

3 logical volume(s) in volume group "rally2cryptvg" now active

Last edited by GazL; 12-05-2011 at 11:54 AM.
 
Old 12-05-2011, 12:27 PM   #3
STDOUBT
Member
 
Registered: May 2010
Location: Stumptown
Distribution: Slackware -current 32bit!
Posts: 566

Rep: Reputation: 217Reputation: 217Reputation: 217
>>lilo complains about usb not being harddisk0

LILO might complain, or throw warnings, but unless it errors out with a "Fatal" error, it should work just fine. My server has 7 hard drives sda through sdg, with /boot on sde and LILO in sde's MBR.
 
Old 12-06-2011, 01:59 PM   #4
Dr.Thodt
LQ Newbie
 
Registered: Dec 2011
Location: Canada
Distribution: slackware
Posts: 20

Original Poster
Rep: Reputation: Disabled
Update:
I changed a line in grub menu.lst to fix the resume
kernel /boot/vmlinuz-huge-smp-2.6.37.6-smp rootdelay=20 root=/dev/rally2cryptvg/root resume=/dev/rally2cryptvg/swap ro vga=794

The system does boot now. (finally)

But still getting weird modprobe errors:

/boot/initrd.gz: Loading kernel modules from initrd image:
usb_storage:exports duplicate symbol usb_stor_sense_invalid CDB (owned by kernel)
usb 4-1: new full speed USB device using ohci_hcd and address 2
modprobe: can't load module usb-storage (kernel/drivers/usb/storage/usb-storage.ko): invalid module format
ehci_hcd: module is already loaded
modprobe: can't load module ehci-hcd (kernel/drivers/usb/host/ehci-hcd.ko): Invalid argument
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
xhci_hcd: module is already loaded
modprobe: can't load module xhci-hcd (kernel/drivers/usb/host/xhci-hcd.ko): Invalid argument
jbd2: exports duplicate symbol jbd_journel_restart (owned by kernel)
modprobe: can't load module jbd2 (kernel/fs/jbd2/jbd2.ko): Invalid module format
mbcache: exports duplicate symbol mb_cache_entry_find_next (owned by kernel)
modprobe: can't load module mbcache (kernel/fs/mbcache.ko): Invalid module format
jbd2: exports duplicate symbol jbd_journel_restart (owned by kernel)
modprobe: can't load module jbd2 (kernel/fs/jbd2/jbd2.ko): Invalid module format

and this after entering luks passphrase
semid 32768: semop failed for cookie 0xd4d109b: incorrect semaphore state
Failed to set a proper state for notification semaphore identified by cookie value 223154331 (0xd4d109b) to initialize waiting for incoming notifications

and this after entering pass:
Trying to resume from ../dm-1
ls: ../dm-1: No such file or directory

ah well... at least it boots and runs, I've been on it for two days compiling my user apps, and have had no problems. Still would like to know why I'm getting those modprobe errors. The bit about ' semid 32768: semop failed for cookie 0xd4d109b: incorrect semaphore state' I read a gentoo bug report that this was a kernel bug, and they marked it as non-critical, someone even confirmed the warning stopped after a kernel upgrade.
And for the 'Trying to resume from ../dm-1
ls: ../dm-1: No such file or directory
I'm pretty sure I can find where it's doing this and change it, regardless I don't think this is important.
STDOUBT- Are you getting any warnings like these during boot on your luks system?
thanks for your input guys !!
 
Old 12-06-2011, 02:20 PM   #5
GazL
LQ Veteran
 
Registered: May 2008
Posts: 5,849

Rep: Reputation: 3786Reputation: 3786Reputation: 3786Reputation: 3786Reputation: 3786Reputation: 3786Reputation: 3786Reputation: 3786Reputation: 3786Reputation: 3786Reputation: 3786
The modprobe issues are because you are using modules and the 'huge' kernel, which they don't belong to. Swap to the generic kernel and you should be fine.

The semid is a non-fatal error from cryptsetup, I get it all the time, or at least used to until recently. As you say, a kernel update seems to have resolved that here too. (running 3.1.4)

Last edited by GazL; 12-06-2011 at 02:25 PM.
 
Old 12-07-2011, 12:58 AM   #6
Dr.Thodt
LQ Newbie
 
Registered: Dec 2011
Location: Canada
Distribution: slackware
Posts: 20

Original Poster
Rep: Reputation: Disabled
...Oh man I'm so embarrassed, I can't believe I didn't catch that, thanks GazL.
 
Old 12-07-2011, 07:48 PM   #7
Dr.Thodt
LQ Newbie
 
Registered: Dec 2011
Location: Canada
Distribution: slackware
Posts: 20

Original Poster
Rep: Reputation: Disabled
changing to generic-smp cleared up all the modprobe warnings
thanks again !
 
Old 12-07-2011, 08:03 PM   #8
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
you may want to see here for extra info

http://www.linuxquestions.org/questi...ndrive-816110/

http://www.linuxquestions.org/questi...olness-691480/

http://www.linuxquestions.org/questi...to-ram-723359/
 
  


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
LUKS LVM with usb token at boot mrmnemo Ubuntu 3 02-26-2011 08:35 AM
[SOLVED] Kernel update on LUKS and LVM encrypted Slackware, mount fails KMBS Slackware 15 02-08-2010 01:23 PM
Slackware 12.2 + RAID-1 + LVM + LUKS encrypted root gargamel Slackware 35 12-17-2009 11:25 AM
Slackware 12.1, LUKS, LVM on external HD. How? randomsel Slackware - Installation 7 06-26-2008 06:35 PM
Windows on LUKS LVM Post Slackware 12.1 Install -{Jester}- Slackware 4 05-23-2008 01:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:08 AM.

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