You are not logged in.

#1 2013-12-11 12:25:23

afree10
Member
Registered: 2013-05-23
Posts: 17

[SOLVED] Arch Linux Boot from USB fails while loading kernel

I am attempting to get arch linux booting off my usb. I use cfdisk to create a /dev/sdb1 partition then use mkfs.ext4 /dev/sdb1, mount the usb, pacstrap it, use install-syslinux_update -iam, generate fstab and then attempt to boot from it.

The boot extracts the kernel but then complains that DEVICE is missing in the option APPEND root=DEVICE (in syslinux.cfg). I looked in /dev/disk (on the temporary filesystem shell), it showed my ssd and cd drive but not the usb. Does anyone know what could be causing the USB to not load in that particular section of the kernel?

Last edited by afree10 (2013-12-11 14:28:14)

Offline

#2 2013-12-11 12:34:03

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: [SOLVED] Arch Linux Boot from USB fails while loading kernel

Did you edit syslinux.cfg?  Did you use labels or UUIDs for the root device in syslinux.cfg?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2013-12-11 12:34:34

afree10
Member
Registered: 2013-05-23
Posts: 17

Re: [SOLVED] Arch Linux Boot from USB fails while loading kernel

yes, both

Offline

#4 2013-12-11 12:38:30

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: [SOLVED] Arch Linux Boot from USB fails while loading kernel

Care to post it?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2013-12-11 12:45:17

afree10
Member
Registered: 2013-05-23
Posts: 17

Re: [SOLVED] Arch Linux Boot from USB fails while loading kernel

LABEL arch
    MENU LABEL Arch Linux
    LINUX ../vmlinuz-linux
    APPEND root=/dev/sdb1
    INITRD ../initramfs-linux.img

also tried root=UUID=blah blah AND other /dev/sd configurations which just caused extra warnings since it was attempting to access my ssd; but since the device is not available in the temporary filesystem it isn't going to matter much what I put here

Last edited by afree10 (2013-12-11 12:49:46)

Offline

#6 2013-12-11 12:49:43

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: [SOLVED] Arch Linux Boot from USB fails while loading kernel

Can you post mkinitcpio.conf? Can you also type 'lsmod' in the ramfs shell and provide the output? The file list from initramfs-linux.img (use lsinitcpio to see it) is helpful too.

Last edited by brain0 (2013-12-11 12:50:07)

Offline

#7 2013-12-11 12:57:36

afree10
Member
Registered: 2013-05-23
Posts: 17

Re: [SOLVED] Arch Linux Boot from USB fails while loading kernel

Due to my situation I have to type the file in from scratch so I will only type uncommented lines:

MODULES=""
BINARIES=""
FILES=""
HOOKS="base udev autodetect modconf block filesystems keyboard fsck"

I will reboot and get that lsmod output.

Offline

#8 2013-12-11 13:01:02

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: [SOLVED] Arch Linux Boot from USB fails while loading kernel

afree10 wrote:

Due to my situation I have to type the file in from scratch so I will only type uncommented lines:

MODULES=""
BINARIES=""
FILES=""
HOOKS="base udev autodetect modconf block filesystems keyboard fsck"

I will reboot and get that lsmod output.

Since you'll probably want to boot from different computers (portable USB system), you want to remove 'autodetect' from that line. This is the same as always booting the initramfs-linux-fallback.img image. To save some space, you could remove 'autodetect' from the configuration file, disable the fallback image in /etc/mkinitcpio.d/linux.preset  and delete initramfs-linux.img (otherwise, you'll get two identical images).

Of course, run mkinitcpio -P when you're done.

Offline

#9 2013-12-11 13:11:00

afree10
Member
Registered: 2013-05-23
Posts: 17

Re: [SOLVED] Arch Linux Boot from USB fails while loading kernel

Module     Size     Used By
sd_mod                0
sr_mod                 0
cdrom                  1 sr_mod
ahci                     0
libahci                  1 ahci
libata                   2 ahci, libahci
scsi_mod             3 libata, sd_mod, sr_mod

I will try your advice now.

Offline

#10 2013-12-11 13:24:53

afree10
Member
Registered: 2013-05-23
Posts: 17

Re: [SOLVED] Arch Linux Boot from USB fails while loading kernel

I get the error: initramfs bad file number

Offline

#11 2013-12-11 13:46:35

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: [SOLVED] Arch Linux Boot from USB fails while loading kernel

afree10 wrote:

Module     Size     Used By
sd_mod                0
sr_mod                 0
cdrom                  1 sr_mod
ahci                     0
libahci                  1 ahci
libata                   2 ahci, libahci
scsi_mod             3 libata, sd_mod, sr_mod

I will try your advice now.

No USB modules loaded. I guess you boot from a different machine than the one you generate the image on? (In any case, ehci should probably be loaded.)

afree10 wrote:

I get the error: initramfs bad file number

Where do you get that error?

Offline

#12 2013-12-11 13:51:17

afree10
Member
Registered: 2013-05-23
Posts: 17

Re: [SOLVED] Arch Linux Boot from USB fails while loading kernel

I install arch to the USB on a virtual machine (running arch) and then boot from the real hardware.

About the same time the kernel image is being extracted.

I have never generated a initramfs before btw, but it seems to have been created just fine (no errors or anything other than two warnings that I know are okay from looking elsewhere). I did backup the orginal so I can restore that but I have a feeling I am going to need to build a initramfs with usb support.

Last edited by afree10 (2013-12-11 13:55:27)

Offline

#13 2013-12-11 14:16:01

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: [SOLVED] Arch Linux Boot from USB fails while loading kernel

The initramfs already has USB support. However, due to being built in the virtual machine (presumably without USB support), the autodetection strips all USB modules from the image - hence I told you to disable autodetection in the image generation.

The initramfs extraction error at boot must be due to file corruption, probably from not properly umounting the USB drive before "unplugging" it from the VM.

Offline

#14 2013-12-11 14:24:04

afree10
Member
Registered: 2013-05-23
Posts: 17

Re: [SOLVED] Arch Linux Boot from USB fails while loading kernel

I removed autodetection from both the vm and the usb os and chrooted the usb and generated the image with the command there.

That is probably the case, I will be more careful to ensure I umount the USB whenever its necessary/shutdown the vitual machine system "the long way", though I am rather surprised corruption could have resulted from that.

Offline

#15 2013-12-11 14:27:30

afree10
Member
Registered: 2013-05-23
Posts: 17

Re: [SOLVED] Arch Linux Boot from USB fails while loading kernel

It is booting now, I will mark the thread as solved. Thank you very much.

Last edited by afree10 (2013-12-11 14:27:42)

Offline

Board footer

Powered by FluxBB