Problems booting with the rootfs on a different partition


I am splitting out the root filesystem from the boot files on the emmc. The boot files are in mmcblkop1 and uboot finds the extlinux.conf file in there fine and begins booting.

If I put the rootfs on mmcblk0p2 and change the extlinux.conf file to pass in root=/dev/mmcblk0p2 it boots fine.

However if I put the rootfs on mmcblk0p3 and change the extlinux.conf file to pass in root=/dev/mmcblk0p3 I get the following on boot:

[ 00:00:00 ] L4T initrd starts from here.....
[ 00:00:00 ] L4T-INITRD Build DATE: Tue Jan  1 00:00:00 UTC 2013
[ 00:00:00 ] Root device found: mmcblk0p
ERROR: mmcblk0p not found

Any help is appreciated.

The error message seems to say it was searching for ‘mmcblk0p’ instead of ‘mmcblk0p3’.
You may check your extlinux.conf for such typo.

I see “ERROR: mmcblk0p not found”, where mmcblk0p is a truncation of mmcblk0p3…it seems to be throwing away the “3”. Also, initrd is noted…any changes you may have made could possibly need a change in the initrd as well.

Assuming you can boot without partitioning…meaning even if you have to boot to mmcblk0p1…what is the output of:

sudo gdisk -l /dev/mmcblk0

Thanks for the replies.

After a bit more investigation it is indeed a problem in the initrd. After failing to boot it drops out a bash terminal and on inspecting the “init” script at the root of the filesystem it has the following line:

rootdev=`cat /proc/cmdline | sed -e 's/.*root=\/dev\/\([abcdefklmnps012]*\).*//'`;

I read that as it will only match on mmcblk0p1 and mmcblk0p2, if I can edit this file and add in a 3 then it should be able to find the third partition.

Now I just need to figure out how to edit that file in the initrd.

The initrd is just a gzip cpio file. You can extract and re-package the contents like this (and of course edit in the middle of the steps):

sudo -s
cd /tmp
mkdir unpack
cd unpack
gunzip < /boot/initrd > initrd.cpio
cpio -vid < initrd.cpio
# explore, edit, so on...
find . -print | cpio -ov > ../initrd-edit.cpio
cd ..
rm -Rf unpack
gzip initrd-edit.cpio
mv initrd-edit.cpio.gz initrd-edit
# the "-edit" naming is just to avoid accidental overwrite of the original.

Excellent, thanks for all the help.

I followed these instructions and now the Ethernet and USB are not appearing on the board when it boots. I tried just unpacking and repacking without changing anything and it does the same. If I then replace it with the original initrd the ethernet and USB come back.

Any ideas?

Are you using this during U-Boot, and then losing functionality after boot? If so, see:

Note that even if your initrd edit added the ability to name another partition I’m unsure of exactly when your error shows up. Logs of boot (e.g., using serial console) would be quite helpful, along with any comment on exactly when ethernet and USB are being used (e.g., during U-Boot, or after complete boot, so on).

Thanks again for all the help.

I managed to fix it by unpacking and repacking the initrd on the TX1 itself (I was doing it in a VM before).