You are not logged in.
Hi Everybody,
I have a problem when I'm using "mkinitcpio 0.12.0-2": My system is not booting anymore from USB.
When I downgrade to mkinitcpio 0.11.2-1 I can boot my system with the generated files.
With mkinitcpio 0.12.0-2 I see:
:: running early hook [udev]
:: running hook [udev]
:: Triggering uevents...
ERROR: Unable to find root device ''I first noticed the following, while I was running "mkinitcpio -p linux":
==> WARNING: Hook 'pata' is deprecated. Replace it with 'block' in your config
-> Running build hook: [block]
==> WARNING: Hook 'scsi' is deprecated. Replace it with 'block' in your config
-> Running build hook: [block]
==> WARNING: Hook 'sata' is deprecated. Replace it with 'block' in your config
-> Running build hook: [block]
[...]
==> WARNING: Hook 'usb' is deprecated. Replace it with 'block' in your config
-> Running build hook: [block]mkinitcpio 0.11.2-1
HOOKS="base udev pata scsi sata filesystems usbinput usb custom"
==> Building image from preset: 'default'
-> -k /boot/vmlinuz-36-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-36-x86_64.img
==> Starting build: 3.6.9-2-MANJARO
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [pata]
-> Running build hook: [scsi]
-> Running build hook: [sata]
-> Running build hook: [filesystems]
-> Running build hook: [usbinput]
-> Running build hook: [usb]
-> Running build hook: [custom]
==> Generating module dependencies
==> Creating gzip initcpio image: /boot/initramfs-36-x86_64.img
==> Image generation successful
==> Building image from preset: 'fallback'
-> -k /boot/vmlinuz-36-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-36-x86_64-fallback.img -S autodetect
==> Starting build: 3.6.9-2-MANJARO
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [pata]
-> Running build hook: [scsi]
-> Running build hook: [sata]
-> Running build hook: [filesystems]
-> Running build hook: [usbinput]
-> Running build hook: [usb]
-> Running build hook: [custom]
==> Generating module dependencies
==> Creating gzip initcpio image: /boot/initramfs-36-x86_64-fallback.img
==> Image generation successfulmkinitcpio 0.12.0-2 ("pata scsi sata usb" are replaced by 1 block hook: No warnings, but the pc still does not boot.)
HOOKS="base udev modconf block filesystems usbinput custom"
==> Building image from preset: 'default'
-> -k /boot/vmlinuz-36-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-36-x86_64.img
==> Starting build: 3.6.9-2-MANJARO
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [modconf]
-> Running build hook: [block]
-> Running build hook: [filesystems]
-> Running build hook: [usbinput]
-> Running build hook: [custom]
==> Generating module dependencies
==> Creating gzip initcpio image: /boot/initramfs-36-x86_64.img
==> Image generation successful
==> Building image from preset: 'fallback'
-> -k /boot/vmlinuz-36-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-36-x86_64-fallback.img -S autodetect
==> Starting build: 3.6.9-2-MANJARO
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [modconf]
-> Running build hook: [block]
-> Running build hook: [filesystems]
-> Running build hook: [usbinput]
-> Running build hook: [custom]
==> Generating module dependencies
==> Creating gzip initcpio image: /boot/initramfs-36-x86_64-fallback.img
==> Image generation successfulWith mkinitcpio 0.12.0-2 the custom hook is not even started (My custom hook starts with echo statements).
My root is in a squashfs file that I prepare in my custom hook, the problem is that I never get to this hook.
Any help would really be appreciated.
Best regards,
John
Edit:
Thanks falconindy and masteryod for the help!
Solution: my 'custom' hook was still using SCRIPT=custom instead of 'add_runscript' in the hook.
Last edited by archinator (2012-12-16 15:38:27)
Offline
To be sure if it's configuration issue or mkinitcpio changes just boot up live-cd, chroot and run mkinitcpio -p linux again from within chrooted environment. If it still fails to boot you need to look at your set-up. Maybe something with squashfs and new mkinitpcio? Sometimes, usually very rarely building initramfs goes wrong. I don't know why. On my PC I had this once or two times in years (just chroot from live-cd to fix that) but on my USB-HDD I had this quite more often.
Second idea is: maybe you block something with modconf hook that is required to boot? see: https://bbs.archlinux.org/viewtopic.php?id=154408
PS you probably should have fsck at the end of HOOKS array in /etc/mkinitcpio.conf, see this: https://bbs.archlinux.org/viewtopic.php?id=137692
[edit]
BTW It seems you're using Manjaro Linux(?) This is Arch Linux forum, not Manjaro forum. You don't ask people about Ubuntu on Debian's forums don't you? This is nothing personal, this is technical thing.
Last edited by masteryod (2012-12-16 14:21:12)
Offline
I'm indeed using the Manjaro Linux kernel, I switched to this kernel for my live system since the aufs was dropped Arch (I don't know how else I can set up a live system that runs from usb).
a)
If you could tell me how to set something similar up with the current Arch linux kernel I would switch.
b)
I already tried via chroot in the filesystem (or when the system is running) and even with another Arch linux pc, but still no luck.
I also tried the same hooks as "mkinitcpio 0.11.2-1" with "mkinitcpio 0.12.0-2": with the v11 generated files I can boot the system, but not with the v12 generated files.
I thought the problem I'm having might be related to the mkinitcpio package (which is the original Arch package).
Is there a way to find out with hook is throwing the "ERROR: Unable to find root device ''" and blocking the boot?
Question a still relates to Arch linux, if the questions from b are too offensive I will not mention them again.
Offline
I suspect your 'custom' hook is written incorrectly and still tries to use SCRIPT=custom instead of simply calling 'add_runscript'.
If you want suggestions for how to setup a live environment without using aufs, i can only suggest looking at archiso: https://projects.archlinux.org/archiso.git/
edit: i'd be curious to know more about your kernel command line and see the full output on boot to understand why $root expands to an empty string -- that shouldn't happen.
Last edited by falconindy (2012-12-16 15:34:20)
Offline
Hi falconindy,
You were right: it was my custom hook that was the problem; I was indeed still using SCRIPT= instead of 'add_runscript'.
It did not look at the hook yet because it was working with the previous version.
I will give archiso a try.
Thank you,
John
Offline
edit: i'd be curious to know more about your kernel command line and see the full output on boot to understand why $root expands to an empty string -- that shouldn't happen.
I'm sorry, I didn't see your edit right away. The reason is because I don't supply the root variable.
My root file system is in a squashed file. The hook looks for the device with this squashed file, when it finds it, it mounts the image.
I actually got my inspiration from lArch/alive (and modified the files to my need).
I have a usb drive with several root file systems: a stable one, and a few for testing. When I start using a new kernel version (or some new programs) I can quickly move back to the previous stable release, or if it is stable enough I can make it my default OS by just using some "ln" statements while the sytsem is running.
This portable system boots on all the pc's that I use (when the system is started I have a script that detects the pc and it starts some services and applies some configurations for that specific system).
My syslinux.cfg looks like:
LABEL cont2
TEXT HELP
Arch Linux container 2.
ENDTEXT
MENU LABEL Arch - container 2 - 3.6 - mkinitcpio 12
LINUX /cont2/vmlinuz
INITRD /cont2/linux.imgIn the APPEND line I have some variables which are used in the hook, like a small wait time (for the USB device to get detected) and a reference to the squashed image.
Offline