Re: [gentoo-user] fsck separate /usr
Canek Peláez Valdés writes: On Sat, May 12, 2012 at 7:43 PM, Alex Schuster wo...@wonkology.org wrote: I'm using the new udev with a separate /usr partition. How do you create your initramfs? The new udev (= 182, I believe) requires the use of an initramfs if you have a separated /usr. I'm using gekernel. It was encrypted, and it seems there is no solution yet for this. dracut has two modules, crypt and crypt-gpg, that maybe do what you are needing. Maybe, I did not (yet?) try dracut. so I moved it over to an unencrypted volume - no problem, /usr is one partition where encryption does not make that much sense anyway. Works, but after an unclean shutdown (reading files in /proc/pid/ was not a good idea) /usr wants to be fsck'ed. But it is already mounted at that stage. That's the reason you need an initramfs. The boot process just continues, but I wonder what one should do to make the fsck run. Except for using a live cd. With an initramfs. Not with mine :) Maybe I'll give dracut a try. It seems to be a nice utility, and I was about to try it, but then I read about Dale's problems and decided to stay with genkernel for a while. Maybe I should just enlarge my root partition and move /usr there, at least this would avoid all the trouble. But I'm used to many separate partitions, and like it that way. You can have every directory under / on a different partition (even /etc), if you use an initramfs. Which I do, every partition (including /) is on LVM, and except for /usr, /usr/src and portage stuff, all is encrypted. But maybe it's time to drop some partitions, and maybe include at least /usr and /tmp in the root partition. /usr would be encrypted again then, but the overhead seems to be small, so why not. Wonko
Re: [gentoo-user] fsck separate /usr
Alex Schuster wrote: Not with mine :) Maybe I'll give dracut a try. It seems to be a nice utility, and I was about to try it, but then I read about Dale's problems and decided to stay with genkernel for a while. Wonko I'm not sure but I think the reason I was having so much trouble was that I didn't remove the failed try at a init thingy in the kernel itself. I tried that first but it didn't work. When I started trying to use dracut, I didn't even think to disable or remove the in kernel one. I have updated my kernel several times since and I have not had a single issue. So, if you decide to use dracut, make sure you clean out the old cruft first. That said, I didn't know dracut could do the file system checks before mounting and doing the switch_root thing. I see it include the programs but never seen it actually do the check. Makes me wonder. Dale :-) :-) -- I am only responsible for what I said ... Not for what you understood or how you interpreted my words! Miss the compile output? Hint: EMERGE_DEFAULT_OPTS=--quiet-build=n
Re: [gentoo-user] fsck separate /usr
120513 Alex Schuster wrote: I'm using the new udev with a separate /usr partition ... after an unclean shutdown -- reading files in /proc/pid/ was not a good idea -- /usr wants to be fsck'ed. But it is already mounted at that stage. Maybe I should just enlarge my root partition and move /usr there Did you see my description of how I did that ? -- see list 120506 . The actual process took me 2 h 30 m , but preparations spread out longer. Everything else is working just as before, but I don't have to bother ever about Initramfs (whatever that is : smile), can update Udev without any worries when it becomes stable. HTH -- ,, SUPPORT ___//___, Philip Webb ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto TRANSIT`-O--O---' purslowatchassdotutorontodotca
Re: [gentoo-user] fsck separate /usr
Philip Webb writes: 120513 Alex Schuster wrote: I'm using the new udev with a separate /usr partition ... after an unclean shutdown -- reading files in /proc/pid/ was not a good idea -- /usr wants to be fsck'ed. But it is already mounted at that stage. Maybe I should just enlarge my root partition and move /usr there Did you see my description of how I did that ? -- see list 120506 . The actual process took me 2 h 30 m , but preparations spread out longer. Everything else is working just as before, but I don't have to bother ever about Initramfs (whatever that is : smile), can update Udev without any worries when it becomes stable. HTH I saw that, but here it will be much easier. All is on LVM here, so this should do it: # enlarge root partition lvresize -L +17G /dev/weird/root cryptsetup resize root resize2fs /dev/mapper/root # make sure /usr is not being written to. For other partitions, I'd # create an LVM snapshot mount -o remount,ro /usr # mount root to another place, without mounts like /usr showing up there mkdir /tmp/bindroot mount -o bind / /tmp/bindroot # copy data over rsync -ax /usr /tmp/bindroot/ # remove /usr stuff from fstab and dmcrypt sed /\/dev\/weird\/usr/ d /etc/fstab sed -i /^target=usr2$/{N;N:N:d} /etc/conf.d/dmcrypt # done! reboot No need for downtime except for the reboot, I guess I cannot unmount /usr otherwise. Wonko
Re: [gentoo-user] fsck separate /usr
On Sun, 13 May 2012 17:11:55 +0200, Alex Schuster wrote: # copy data over rsync -ax /usr /tmp/bindroot/ It would be wise to remount /usr read-only before doing this. No need for downtime except for the reboot, I guess I cannot unmount /usr otherwise. You could drop to single user mode to unmount /usr, but as that involves stopping and restarting just about every service, it is just as convenient to reboot... unless you are aiming for some sort of uptime record. -- Neil Bothwick In possession of a mind not merely twisted, but actually sprained. signature.asc Description: PGP signature
Re: [gentoo-user] fsck separate /usr
Neil Bothwick writes: On Sun, 13 May 2012 17:11:55 +0200, Alex Schuster wrote: # copy data over rsync -ax /usr /tmp/bindroot/ It would be wise to remount /usr read-only before doing this. Yes, as written a few lines above what you quoted :) No need for downtime except for the reboot, I guess I cannot unmount /usr otherwise. You could drop to single user mode to unmount /usr, but as that involves stopping and restarting just about every service, it is just as convenient to reboot... Probably much much more convenient. I even guess the downtime of any service would actually be less. unless you are aiming for some sort of uptime record. The record is about 420 days, and it will last for a while. So rebooting every few weeks is okay :) But it's cool that I _could_ do this without a reboot. Wonko
Re: [gentoo-user] fsck separate /usr
On Sun, 13 May 2012 19:27:07 +0200, Alex Schuster wrote: It would be wise to remount /usr read-only before doing this. Yes, as written a few lines above what you quoted :) :P -- Neil Bothwick Do hungry crows have ravenous appetites? signature.asc Description: PGP signature
Re: [gentoo-user] fsck separate /usr
On Sat, May 12, 2012 at 7:43 PM, Alex Schuster wo...@wonkology.org wrote: Hi there! I'm using the new udev with a separate /usr partition. How do you create your initramfs? The new udev (= 182, I believe) requires the use of an initramfs if you have a separated /usr. It was encrypted, and it seems there is no solution yet for this. dracut has two modules, crypt and crypt-gpg, that maybe do what you are needing. so I moved it over to an unencrypted volume - no problem, /usr is one partition where encryption does not make that much sense anyway. Works, but after an unclean shutdown (reading files in /proc/pid/ was not a good idea) /usr wants to be fsck'ed. But it is already mounted at that stage. That's the reason you need an initramfs. The boot process just continues, but I wonder what one should do to make the fsck run. Except for using a live cd. With an initramfs. Maybe I should just enlarge my root partition and move /usr there, at least this would avoid all the trouble. But I'm used to many separate partitions, and like it that way. You can have every directory under / on a different partition (even /etc), if you use an initramfs. Regards. -- Canek Peláez Valdés Posgrado en Ciencia e Ingeniería de la Computación Universidad Nacional Autónoma de México
Re: [gentoo-user] fsck separate /usr
On Sat, 12 May 2012 19:54:24 -0500 Canek Peláez Valdés can...@gmail.com wrote: On Sat, May 12, 2012 at 7:43 PM, Alex Schuster wo...@wonkology.org wrote: Hi there! I'm using the new udev with a separate /usr partition. How do you create your initramfs? The new udev (= 182, I believe) requires the use of an initramfs if you have a separated /usr. It was encrypted, and it seems there is no solution yet for this. dracut has two modules, crypt and crypt-gpg, that maybe do what you are needing. so I moved it over to an unencrypted volume - no problem, /usr is one partition where encryption does not make that much sense anyway. Works, but after an unclean shutdown (reading files in /proc/pid/ was not a good idea) /usr wants to be fsck'ed. But it is already mounted at that stage. That's the reason you need an initramfs. No, that's the reason you want the filesystem's fsck to be included in the initramfs. The boot process just continues, but I wonder what one should do to make the fsck run. Except for using a live cd. With an initramfs. Using initramfs is necessary but itself not sufficient. One can create an initramfs (from scratch) that does nothing but mount /usr (with only busybox and a few /dev nodes, plus whatever other tools needed to find /usr, viz. lvm, cryptsetup and friends, assuming the necessary drivers are built in the kernel and not as modules --- see e.g. the old gentoo wiki at http://www.gentoo-wiki.info/HOWTO_Custom_Initramfs_From_Scratch ). The initramfs needs to have the relevant fsck tools (plus dependencies) if it was to perform fsck. Kerwin. signature.asc Description: PGP signature
Re: [gentoo-user] fsck separate /usr
On Sat, May 12, 2012 at 10:54 PM, kwk...@hkbn.net wrote: On Sat, 12 May 2012 19:54:24 -0500 Canek Peláez Valdés can...@gmail.com wrote: On Sat, May 12, 2012 at 7:43 PM, Alex Schuster wo...@wonkology.org wrote: Hi there! I'm using the new udev with a separate /usr partition. How do you create your initramfs? The new udev (= 182, I believe) requires the use of an initramfs if you have a separated /usr. It was encrypted, and it seems there is no solution yet for this. dracut has two modules, crypt and crypt-gpg, that maybe do what you are needing. so I moved it over to an unencrypted volume - no problem, /usr is one partition where encryption does not make that much sense anyway. Works, but after an unclean shutdown (reading files in /proc/pid/ was not a good idea) /usr wants to be fsck'ed. But it is already mounted at that stage. That's the reason you need an initramfs. No, that's the reason you want the filesystem's fsck to be included in the initramfs. The boot process just continues, but I wonder what one should do to make the fsck run. Except for using a live cd. With an initramfs. Using initramfs is necessary but itself not sufficient. One can create an initramfs (from scratch) that does nothing but mount /usr (with only busybox and a few /dev nodes, plus whatever other tools needed to find /usr, viz. lvm, cryptsetup and friends, assuming the necessary drivers are built in the kernel and not as modules --- see e.g. the old gentoo wiki at http://www.gentoo-wiki.info/HOWTO_Custom_Initramfs_From_Scratch ). The initramfs needs to have the relevant fsck tools (plus dependencies) if it was to perform fsck. Dracut (and I believe genkernel, but I don't use it, so I'm not sure) does all of that (and more, if so desired) for you. Regards. -- Canek Peláez Valdés Posgrado en Ciencia e Ingeniería de la Computación Universidad Nacional Autónoma de México