Instructions for creating an initial ramdisk

AmigaOne X1000 platform specific issues related to Linux only.
Post Reply
User avatar
xeno74
Posts: 9319
Joined: Fri Mar 23, 2012 7:58 am

Instructions for creating an initial ramdisk

Post by xeno74 »

Hi All,

With an initial ramdisk you can boot with a LABEL or UUID. You can create a ramdisk with the following instructions:


X1000:

First, you need to copy the kernel modules directory to /lib/modules. For example:

Code: Select all

# cp -R 5.3.0-rc1_A-EON_X1000_Nemo /lib/modules
After that you can create the initial ramdisk with the following command:

Code: Select all

mkinitramfs -o initrd-5.3.img 5.3.0-rc1_A-EON_X1000_Nemo
You can boot the X1000 with a LABEL and the initrd-5.3.img with the following commands:

Code: Select all

ramdisk -z -addr=0x2400000 -fatfs cf0:initrd-5.3.img
Booting with a LABEL (For example Fedora):

Code: Select all

setenv bootargs "root=LABEL=Fedora"

Code: Select all

boot -elf -noints -fatfs cf0:vmlinux-5.3
X5000:

First, you need to copy the kernel modules directory to /lib/modules. For example:

Code: Select all

# cp -R 5.3.0-rc1_A-EON_X5000 /lib/modules
After that you can create the initial ramdisk with the following commands:

Code: Select all

mkinitramfs -o initrd-5.3.img 5.3.0-rc1_A-EON_X5000

Code: Select all

mkimage -T ramdisk -C gzip -n 'Kernel 5.3-rc1 uInitrd' -d initrd-5.3.img uInitrd-5.3
If your system doesn't have the mkimage command then please install it with "apt-get install u-boot-tools".

You can boot the X5000 with a LABEL and the uInitrd-5.3 with the following commands:

Code: Select all

setenv bootargs root=LABEL=Fedora
For example loading the kernel, dtb file, and ramdisk from the first FAT partition on a hard disk:

Code: Select all

load sata 0:1 1000000 uImage-5.3

Code: Select all

load sata 0:1 1c00000 cyrus.dtb

Code: Select all

load sata 0:1 2000000 uInitrd-5.3

Code: Select all

bootm 1000000 2000000 1c00000
BTW, with the command "tune2fs -L <partition name> <block device>" you can modify the LABEL. For example:

Code: Select all

tune2fs -L Fedora /dev/sda3
Cheers,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9319
Joined: Fri Mar 23, 2012 7:58 am

Re: Instructions for creating an initial ramdisk

Post by xeno74 »

Hi All,

I created ramdisks for the kernel 5.5 yesterday.

Download: initrd-5.5-rc7-X1000_X5000.tar.gz

Screenshot with instructions for creating and booting initial ramdisks:

Image

Cheers,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9319
Joined: Fri Mar 23, 2012 7:58 am

Re: Instructions for creating an initial ramdisk

Post by xeno74 »

xeno74 wrote: Fri Jul 26, 2019 12:13 pm BTW, with the command "tune2fs -L <partition name> <block device>" you can modify the LABEL. For example:

Code: Select all

tune2fs -L Fedora /dev/sda3
With "fatlabel /dev/device NEW_LABEL" you can modify the LABEL of a FAT partition.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
Post Reply