Find the answer to your Linux question:
Results 1 to 8 of 8
Hi everyone Few days ago I decided to read about creating own bootable Linux. I've found a tutorial ("Building tiny Linux systems with Busybox") at linuxjournal.com, and went trough every ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2011
    Posts
    4

    Own USB bootable linux - mounting filesystem error


    Hi everyone
    Few days ago I decided to read about creating own bootable Linux. I've found a tutorial ("Building tiny Linux systems with Busybox") at linuxjournal.com, and went trough every step. I've compiled Linux kernel (2.6.39.4), bussybox (latest version) and then created initrd (in a few different ways that I've found on the net). After that I've tried to boot my new Linux from USB (and also on VM on other machine). Kernel has been found, ram disk has been created and loaded, but then the situation became as on attachment.

    I've tried a few compilations of kernel and different versions of initrd.
    I'll be very thankful for your help
    Attached Images Attached Images

  2. #2
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    3,043
    You must have compiled into the kernel support for the device being accessed and file system for accessing the root file system. You also need to be pointing correctly to your root partition using the bootloader. You must also have correct assignment for root partition in /etc/fstab.

    ... the BIOS for your system must also support USB boot

    The problem is in one of the above, the other thing which has caused me problems in the past is depending on kernel version and modules used hard drive may have /dev/sda or /dev/hda designation. You can get round this using LABEL= to identify root (should be supported by all kernel versions) or by using UUID references. The order of drives /dev/sda /dev/sdb etc can also change for USB devices.

  3. #3
    Just Joined!
    Join Date
    Sep 2011
    Posts
    4
    Thanks for your reply.
    I've went trough it. Problem was about kernel. I've missed one module that was moved since 2.2.* (which was mentioned in the tutorial). Now I've got another one.
    "No init found. Try passing init= option to kernel." It's strange because I've included /etc/init.d/rcS file in filesystem(initrd image). What could go wrong?
    Last edited by Jaszczomb; 09-11-2011 at 04:51 PM.

  4. #4
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    3,043
    assume you have been following this ... have you made the sh link in tiny system bin folder? what happens if you use init=/bin/sh ?

    ... I have not run through the process
    btw I'm assume you created all the relevant links in bin including init
    Last edited by Jonathan183; 09-11-2011 at 10:09 PM.

  5. #5
    Linux Enthusiast
    Join Date
    Jan 2005
    Location
    Saint Paul, MN
    Posts
    648
    Quote Originally Posted by Jaszczomb View Post
    Thanks for your reply.
    I've went trough it. Problem was about kernel. I've missed one module that was moved since 2.2.* (which was mentioned in the tutorial). Now I've got another one.
    "No init found. Try passing init= option to kernel." It's strange because I've included /etc/init.d/rcS file in filesystem(initrd image). What could go wrong?
    The "init" here is not the the "init.d" directory. The first user space program, and the only one that the kernel starts, is "init". It usually resides at "/sbin/init". There is a kernel option that can be passed on the grub "kernel" statement that can point to the desired executable. You did not say if you are using an initial ramdisk for booting.

  6. #6
    Just Joined!
    Join Date
    Sep 2011
    Posts
    4
    Sorry I've missed info that I'm using initial ram disc. I have it mounted without any problem. The error comes up right after mounting file system. I'm using romfs build with 'genromfs' program. 'Init not found' error occurs right after mounting file system. Setting init=/etc/init.d/ doesn't help. I'll try to experiment with changing init directory to /sbin/init
    @Jonathan
    When i use init=/bin/sh it says that it could not be executed. I made everything step.

    @EDIT
    I have an idea to create initial ram disc using by initramfs, not initrd, maybe this will help.

    @EDIT 2
    I've found this: jootamam.net/howto-initramfs-image.htm and also read more about initrd/initramfs. I've followed those instructions and used /init that was shown there. Now kernel locates /init but still: "Failed to execute /init".
    The /init code is the same as at the site I mentioned.
    Last edited by Jaszczomb; 09-12-2011 at 06:10 PM.

  7. #7
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    3,043
    check your bin folder that you created all the links, since you are using busybox to give lots of commands including sh ... you can also try changing to the bin folder and using ./sh and see if it throws any errors.

  8. #8
    Just Joined!
    Join Date
    Sep 2011
    Posts
    4
    I'm afraid that the problem lays deeper. I think that's something about mounted filesystem. Everything i try to init (no mater what, sh or /init) i get 'Failed to execute: <name>". Could you give me any references or "How To's" about creating initrd/initramf? (best would be if you tested some yourselves)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •