You are not logged in.
Hi, I have a separate /usr partition and wasn't updating my system (a half year I think) when it was announced that separate /usr partition will become unsupported. But ~2 month ago with a new mkinitcpio version there were added new hooks (usr, fsck and shutdown) to add support of a separate /usr. Today I updated my system, fixed all problems/configuration merges, added the desired hooks in the mkinitcpio.conf, regenerated the images and rebooted. Here is what I've got:
And here is my mkinitcpio.conf file:
# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run. Advanced users may wish to specify all system modules
# in this array. For instance:
# MODULES="piix ide_disk reiserfs"
MODULES=""
# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image. This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=""
# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way. This is useful for config files.
# Some users may wish to include modprobe.conf for custom module options
# like so:
# FILES="/etc/modprobe.d/modprobe.conf"
FILES=""
# HOOKS
# This is the most important setting in this file. The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added. Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
## This setup specifies all modules in the MODULES setting above.
## No raid, lvm2, or encrypted root is needed.
# HOOKS="base"
#
## This setup will autodetect all modules for your system and should
## work as a sane default
# HOOKS="base udev autodetect pata scsi sata filesystems"
#
## This is identical to the above, except the old ide subsystem is
## used for IDE devices instead of the new pata subsystem.
# HOOKS="base udev autodetect ide scsi sata filesystems"
#
## This setup will generate a 'full' image which supports most systems.
## No autodetection is done.
# HOOKS="base udev pata scsi sata usb filesystems"
#
## This setup assembles a pata mdadm array with an encrypted root FS.
## Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
# HOOKS="base udev pata mdadm encrypt filesystems"
#
## This setup loads an lvm2 volume group on a usb device.
# HOOKS="base udev usb lvm2 filesystems"
#
## NOTE: If you have /usr on a separate partition, you MUST include the
# usr, fsck and shutdown hooks.
HOOKS="base udev usbinput usr fsck shutdown autodetect pata scsi sata encrypt filesystems"
# COMPRESSION
# Use this to compress the initramfs image. By default, gzip compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=""So it seems the ecnrypt hook hadn't luksOpen'ed the encrypted volumes. How can this be fixed?
Thank you.
Last edited by backmack (2012-09-02 12:10:43)
Offline
Anybody?
As I can imagine the boot process, this problem occurs when the "usr" hook is trying to mount the /usr partition, but the process which should read the crypttab and create the virtual device-mapper devices was not executed yet. So, is it possible to force it to be executed at such an early stage of the boot process or I am not that much lucky?
Offline
my HOOKS: HOOKS="base udev autodetect pata scsi sata encrypt lvm2 filesystems usbinput usr fsck"
try add fsck to yours.
Offline
I have a separate /usr partition and wasn't updating my system (a half year I think) when it was announced that separate /usr partition will become unsupported.
I don't see any announcement like that here: http://www.archlinux.org/news/
Next time please specify in the title that the separate /usr is encrypted.
I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).
Offline
my HOOKS: HOOKS="base udev autodetect pata scsi sata encrypt lvm2 filesystems usbinput usr fsck"
try add fsck to yours.
I have fsck in mine:
HOOKS="base udev usbinput usr fsck shutdown autodetect pata scsi sata encrypt filesystems"
Do I understand correctly: You have an encrypted and separate /usr and it is working?
I don't see any announcement like that here: http://www.archlinux.org/news/
Here is the link in the Wiki:
https://wiki.archlinux.org/index.php/Mk … _partition
And here are help comments in the mkinitcpio.conf
## NOTE: If you have /usr on a separate partition, you MUST include the
# usr, fsck and shutdown hooks.So separate /usr IS indeed officially supported
Next time please specify in the title that the separate /usr is encrypted.
My fault, and why next time? Fixed.
Last edited by backmack (2012-09-02 12:16:51)
Offline
What if you move the "encrypt" hook before "usr" in mkinitcpio.conf and re-generate the initramfs?
Would that work?
I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).
Offline
What if you move the "encrypt" hook before "usr" in mkinitcpio.conf and re-generate the initramfs?
Would that work?
I will try (I'm now booted from a live-dvd) soon, but reading the source code of the encrypt hook ( https://projects.archlinux.org/svntogit … cryptsetup ) I doubt it will work because it doesn't read the crypttab to unlock the encrypted partitions, its job is to just unlock the root ("/") partition.
Offline
What if you move the "encrypt" hook before "usr" in mkinitcpio.conf and re-generate the initramfs?
Would that work?
It didn't ![]()
As I understand, I have 2 options:
1. (very hard for me) fork the encrypt hook and make it unlock the /usr partition
2. (should be easy) Merge "/" and "/usr"
I can't merge "/usr" into "/" because my "/" is small (5 GB), just as much as the entire "/usr" is now consuming from its 20 GB. So I should merge "/" into "/usr". I see it this way: (please tell me if I am wrong)
0. Boot from a live-dvd
1. mount the "/" at /mnt/root
2. mount the "/usr" at /mnt/usr
3. mkdir /mnt/usr/usr
4. move everything from /mnt/usr into /mnt/usr/usr
5. copy everything from /mnt/root into /mnt/usr
6. remove /usr line from the fstab
7. remove /usr line from the crypttab
8. change the old "/usr" aka "will-be-/" to accept a password instead of a keyfile
9. fix the "cryptdevice=" string in the /boot/grub/menu.lst to point to the old "/usr" as a new "/"
10. try to boot
Have I forgotten something?
Added 1:
And please tell me how do I copy/move files in the live system so that the files owner/group values and permissions preserve. Should I use rsync?
Added 2:
And how do I regenerate the init image using mkinitcpio from a live-dvd?
Last edited by backmack (2012-09-02 13:49:14)
Offline
I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).
Offline
Thank you DSpider for helping. Done, I've moved the "/" into "/usr" and made the "/usr" a new "/". I won't prefix the title to [Solved] because this is not a solving of the original problem but a workaround.
Offline
I won't prefix the title to [Solved] because this is not a solving of the original problem but a workaround.
I like your thinking here.
Offline