Custom Initramfs does not boot

The name of the pictureThe name of the pictureThe name of the pictureClash 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?







share|improve this question



















  • 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
















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?







share|improve this question



















  • 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












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?







share|improve this question











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?









share|improve this question










share|improve this question




share|improve this question









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
















  • 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















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















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



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














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













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay