• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Sheeva-With-Linux kernels don't support specifying the root fs by uuid?  (Read 2040 times)
emper0r
Newbie
*

Karma: 0
Posts: 2


View Profile
« on: April 09, 2010, 07:23:55 AM »

Hello,

I have 3 usb hard drives on my Sheevaplug and I'm currently using Debian with the "2.6.31-trunk-kirkwood" kernel. I want to start using the sheeva-with-linux kernels because they get updated much faster, but I encountered a problem with mounting the root filesystem. Basically I can mount it with root=/dev/sdx1 (x being a b or c, they change every once in a while which is the reason I need to use uuid) but I can't mount it by having root=UUID=xxxxxxxxxxxxxxxxxxxxxxx. This problem does not happen with the Debian kernel and everything works fine there.

I'm not an expert on Linux kernels and on the Linux boot process, but I read that mounting using uuid is one of the advantages of using an initrd and the sheeva-with-linux kernels don't seem to have one. I tried creating one with the standard update-initramfs but the resulting image doesn't seem usable by U-Boot. Also even if I manage to build one I wouldn't know where to load it because with the Debian kernel I load uImage to 0x400000 and uInitrd to 0x0800000, but the image file in sheeva-with-linux needs to be loaded to 0x800000 to work.

Could someone give me some pointers on how to build an initrd based on the sheeva-with-linux kernels that is usable by U-Boot and give me some pointers on where I'm supposed to load it?

Thanks

PS. I use an SD card formatted with ext2 to store the boot files (in the NAND I keep the original Ubuntu shipped with the plug as a failsafe). The bootcmd I use for the Debian kernel is:
'mmcinit; ext2load mmc 0 0x0800000 /uInitrd.new; ext2load mmc 0 0x400000 /uImage.new; bootm 0x400000 0x0800000'
and for the sheeva-with-linux kernel:
'mmcinit; ext2load mmc 0 0x800000 /uImage; bootm 0x800000'
« Last Edit: April 09, 2010, 07:28:38 AM by emper0r » Logged

fragfutter
Sr. Member
****

Karma: 12
Posts: 280


View Profile
« Reply #1 on: April 09, 2010, 08:13:07 AM »

to build an initrd for the sheevaplug you need to use mkimage. There has to be a special header. Doing a boot to initrd, finding root device and doing a pivot root is a bit advanced.

You can load the kernel and the initrd to any adress you like.

* As long as they don't overlap
* The kernel can unpack itself to the beginning of the memory without overwriting something
* Same unpack/overwrite for initrd


as you have stated that you are not an linux expert i would suggest to skip this and stick with /dev/sdaX

Logged

pingtoo
Sr. Member
****

Karma: 15
Posts: 318


View Profile
« Reply #2 on: April 09, 2010, 09:23:16 AM »

@emper0r,

I am not familiar with Debian so I can not comment how to make the initrd you want but once you manage to get one then you can use following to get to work with plug.

At your plug shell prompt,
Code:
root # mkimage -A arm -O linux -T ramdisk -C gzip -a 0x0 -e 0x0 -n "initrd" -d /path/to/initrd.img /path/to/saved/copy/uInitrd
root # cp -a /path/to/saved/copy/uInitrd /mounted/SD/uInitrd

Now you should be able to use the new uInitrd as you did for Debian
Code:
Marvell>> ext2load mmc 0 0x01100000 /uInitrd; ext2load mmc 0 0x02000000  /uImage.new
Marvell>> bootm 0x02000000 0x01100000

Good luck Smiley
Logged

Good Luck Smiley

emper0r
Newbie
*

Karma: 0
Posts: 2


View Profile
« Reply #3 on: April 09, 2010, 10:49:38 AM »

Your solution worked pingtoo, thank you very much!

EDIT: I should mention that I had to do some minor corrections to the u-boot commands above. I'll post them below, in-case someone tries copy pasting and gets stuck.

To boot the system once without saving the changes:
Code:
Marvell>> mmcinit; ext2load mmc 0 0x01100000 /uInitrd; ext2load mmc 0 0x02000000 /uImage;
Marvell>> bootm 0x02000000 0x01100000

And to save the changes:
Code:
Marvell>> setenv bootcmd 'mmcinit; ext2load mmc 0 0x01100000 /uInitrd; ext2load mmc 0 0x02000000 /uImage; bootm 0x02000000 0x01100000'
Marvell>> saveenv
Marvell>> reset
« Last Edit: April 09, 2010, 11:21:06 AM by emper0r » Logged

Pages: [1]
Print
Jump to: