Custom Initramfs does not boot
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
0
down vote
favorite
I built a custom initramfs on an udoo-neo using the following instructions:
mkdir -p /usr/src/initramfs/bin,dev,etc,lib,lib64,mnt/root,proc,root,sbin,sys
cp -a /dev/null,console,tty,mmcblk0p2 /usr/src/initramfs/dev/
sudo apt-get install busybox-static
cp -a /bin/busybox /usr/src/initramfs/bin/busybox
My init file is:
#!/bin/busybox sh
# Mount the /proc and /sys filesystems.
mount -t proc none /proc
mount -t sysfs none /sys
# Do your stuff here.
echo "This script just mounts and boots the rootfs, nothing else!"
# Mount the root filesystem.
mount -o ro /dev/mmcblk0p2/mnt/root
# Clean up.
umount /proc
umount /sys
# Boot the real thing.
exec switch_root /mnt/root /sbin/init
And then I do
chmod +x /usr/src/initramfs/init
After setting the initramfs source file to "/usr/src/initramfs", rebuilding, copying it back to the SD card and rebooting, i just boot into my normal screen, and the echo message does not appear. I've checked if zImage is being written properly (it is). How can I fix this?
linux-kernel initramfs
add a comment |Â
up vote
0
down vote
favorite
I built a custom initramfs on an udoo-neo using the following instructions:
mkdir -p /usr/src/initramfs/bin,dev,etc,lib,lib64,mnt/root,proc,root,sbin,sys
cp -a /dev/null,console,tty,mmcblk0p2 /usr/src/initramfs/dev/
sudo apt-get install busybox-static
cp -a /bin/busybox /usr/src/initramfs/bin/busybox
My init file is:
#!/bin/busybox sh
# Mount the /proc and /sys filesystems.
mount -t proc none /proc
mount -t sysfs none /sys
# Do your stuff here.
echo "This script just mounts and boots the rootfs, nothing else!"
# Mount the root filesystem.
mount -o ro /dev/mmcblk0p2/mnt/root
# Clean up.
umount /proc
umount /sys
# Boot the real thing.
exec switch_root /mnt/root /sbin/init
And then I do
chmod +x /usr/src/initramfs/init
After setting the initramfs source file to "/usr/src/initramfs", rebuilding, copying it back to the SD card and rebooting, i just boot into my normal screen, and the echo message does not appear. I've checked if zImage is being written properly (it is). How can I fix this?
linux-kernel initramfs
open the initram, and check it. it is a regular arquive, maybe cpio to open it, cant remember.
â Rui F Ribeiro
Jul 19 at 17:45
its a .gz file, and it contains all the files in /usr/src/initramfs
â JHarden13
Jul 19 at 20:29
So, are all the files there? Are you running update-grub after creating the initrd btw?
â Rui F Ribeiro
Jul 19 at 20:29
All the files are there, and the udoo-neo doesn't use grub. I copy the zImage and dts files to the bootable SD card and it works. The zImage is also being overwritten, I checked.
â JHarden13
Jul 19 at 20:41
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I built a custom initramfs on an udoo-neo using the following instructions:
mkdir -p /usr/src/initramfs/bin,dev,etc,lib,lib64,mnt/root,proc,root,sbin,sys
cp -a /dev/null,console,tty,mmcblk0p2 /usr/src/initramfs/dev/
sudo apt-get install busybox-static
cp -a /bin/busybox /usr/src/initramfs/bin/busybox
My init file is:
#!/bin/busybox sh
# Mount the /proc and /sys filesystems.
mount -t proc none /proc
mount -t sysfs none /sys
# Do your stuff here.
echo "This script just mounts and boots the rootfs, nothing else!"
# Mount the root filesystem.
mount -o ro /dev/mmcblk0p2/mnt/root
# Clean up.
umount /proc
umount /sys
# Boot the real thing.
exec switch_root /mnt/root /sbin/init
And then I do
chmod +x /usr/src/initramfs/init
After setting the initramfs source file to "/usr/src/initramfs", rebuilding, copying it back to the SD card and rebooting, i just boot into my normal screen, and the echo message does not appear. I've checked if zImage is being written properly (it is). How can I fix this?
linux-kernel initramfs
I built a custom initramfs on an udoo-neo using the following instructions:
mkdir -p /usr/src/initramfs/bin,dev,etc,lib,lib64,mnt/root,proc,root,sbin,sys
cp -a /dev/null,console,tty,mmcblk0p2 /usr/src/initramfs/dev/
sudo apt-get install busybox-static
cp -a /bin/busybox /usr/src/initramfs/bin/busybox
My init file is:
#!/bin/busybox sh
# Mount the /proc and /sys filesystems.
mount -t proc none /proc
mount -t sysfs none /sys
# Do your stuff here.
echo "This script just mounts and boots the rootfs, nothing else!"
# Mount the root filesystem.
mount -o ro /dev/mmcblk0p2/mnt/root
# Clean up.
umount /proc
umount /sys
# Boot the real thing.
exec switch_root /mnt/root /sbin/init
And then I do
chmod +x /usr/src/initramfs/init
After setting the initramfs source file to "/usr/src/initramfs", rebuilding, copying it back to the SD card and rebooting, i just boot into my normal screen, and the echo message does not appear. I've checked if zImage is being written properly (it is). How can I fix this?
linux-kernel initramfs
asked Jul 19 at 15:49
JHarden13
383
383
open the initram, and check it. it is a regular arquive, maybe cpio to open it, cant remember.
â Rui F Ribeiro
Jul 19 at 17:45
its a .gz file, and it contains all the files in /usr/src/initramfs
â JHarden13
Jul 19 at 20:29
So, are all the files there? Are you running update-grub after creating the initrd btw?
â Rui F Ribeiro
Jul 19 at 20:29
All the files are there, and the udoo-neo doesn't use grub. I copy the zImage and dts files to the bootable SD card and it works. The zImage is also being overwritten, I checked.
â JHarden13
Jul 19 at 20:41
add a comment |Â
open the initram, and check it. it is a regular arquive, maybe cpio to open it, cant remember.
â Rui F Ribeiro
Jul 19 at 17:45
its a .gz file, and it contains all the files in /usr/src/initramfs
â JHarden13
Jul 19 at 20:29
So, are all the files there? Are you running update-grub after creating the initrd btw?
â Rui F Ribeiro
Jul 19 at 20:29
All the files are there, and the udoo-neo doesn't use grub. I copy the zImage and dts files to the bootable SD card and it works. The zImage is also being overwritten, I checked.
â JHarden13
Jul 19 at 20:41
open the initram, and check it. it is a regular arquive, maybe cpio to open it, cant remember.
â Rui F Ribeiro
Jul 19 at 17:45
open the initram, and check it. it is a regular arquive, maybe cpio to open it, cant remember.
â Rui F Ribeiro
Jul 19 at 17:45
its a .gz file, and it contains all the files in /usr/src/initramfs
â JHarden13
Jul 19 at 20:29
its a .gz file, and it contains all the files in /usr/src/initramfs
â JHarden13
Jul 19 at 20:29
So, are all the files there? Are you running update-grub after creating the initrd btw?
â Rui F Ribeiro
Jul 19 at 20:29
So, are all the files there? Are you running update-grub after creating the initrd btw?
â Rui F Ribeiro
Jul 19 at 20:29
All the files are there, and the udoo-neo doesn't use grub. I copy the zImage and dts files to the bootable SD card and it works. The zImage is also being overwritten, I checked.
â JHarden13
Jul 19 at 20:41
All the files are there, and the udoo-neo doesn't use grub. I copy the zImage and dts files to the bootable SD card and it works. The zImage is also being overwritten, I checked.
â JHarden13
Jul 19 at 20:41
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f457252%2fcustom-initramfs-does-not-boot%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
open the initram, and check it. it is a regular arquive, maybe cpio to open it, cant remember.
â Rui F Ribeiro
Jul 19 at 17:45
its a .gz file, and it contains all the files in /usr/src/initramfs
â JHarden13
Jul 19 at 20:29
So, are all the files there? Are you running update-grub after creating the initrd btw?
â Rui F Ribeiro
Jul 19 at 20:29
All the files are there, and the udoo-neo doesn't use grub. I copy the zImage and dts files to the bootable SD card and it works. The zImage is also being overwritten, I checked.
â JHarden13
Jul 19 at 20:41