Page 1 of 1

iSCSI Dracut attempting to mount a device not a partition

Posted: Tue Feb 09, 2016 11:25 pm
by degeulars
Hello,

I have been trying to get iSCSI rootfs working on the raspberry pi for a while now and have failed using initramfs.
I have now tried to use dracut-network and pass the iSCSI target options via cmdline.txt
It seems to start out well, the iSCSI target shows up as /dev/sda but ultimatley dracut fails to boot from the target giving the same error message as when attempting to mount a device (/dev/sda) and not a partition (/dev/sda1).

My cmdline.txt is as follows

Code: Select all

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 ip=192.168.0.39 netmask=255.255.255.0 root=iscsi:@192.168.0.40::::iqn.2005-10.org.domain.host:target iscsi-initiator=iqn.2005-10.org.domain.raspberrypi:01 elevator=deadline rootfstype=ext4 fsck.repair=yes rootwait
My config.txt is as follows

Code: Select all

initramfs initramfs.img
dtparam=audio=on

The error i get from the dracut journalctl is

Code: Select all

Mounting /sysroot
mount: wrong fs type, bad option, bad superblock on /dev/sda,
EXT4-fs (sda): VFS: Can't find ext4 filesystem
missing codepage or helper program, or other error
This is the same error message you get when you miss a number and type

Code: Select all

mount -t ext4 /dev/sda /sysroot
And when I manually type in

Code: Select all

mount -t ext4 /dev/sda1 /sysroot
The partition mounts, and I can go in and see the files.

Is there anyway to specify the partition number the rootfs is on, or is it a bug in dracut? Could the cmdline.txt argument

Code: Select all

blkdevparts=
be useful for something here, and what would the syntax be?

Here is the rdsosreport.txt that dracut outputs

http://pastebin.com/ssieGz4M


Thank you for your help.

Re: iSCSI Dracut attempting to mount a device not a partitio

Posted: Fri Feb 12, 2016 7:53 pm
by degeulars
For those interested I got it to work by specifying the partition ID
On the running system identify the PARTUUID by using

Code: Select all

blkid
It then works by specifying the iSCSI target in netroot= and the partition UUID in root= like this in the cmdline.txt

Code: Select all

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 ip=192.168.0.XXX netmask=255.255.255.0 netroot=iscsi:@192.168.0.XXX::::iqn.XXXX-XX.org.domain.host:target iscsi-initiator=iqn.XXXX-XX.org.domain.host:01 root=PARTUUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait