Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, I'm trying to build minimal single user linux and run it on my usb key. I created 1 bootable partition, created ext2 filesystem, installed grub and copied /dev directory ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2009
    Posts
    2

    custom linux problem with init


    Hi,
    I'm trying to build minimal single user linux and run it on my usb key. I created 1 bootable partition, created ext2 filesystem, installed grub and copied /dev directory from my other linux box. Having filesystem with following directories:
    boot
    dev
    lost+found

    I have compilied 2.6.28.4 linux with default selections that are present on make menuconfig only removing options for initrd and loadable module support, hoping that all modules required to mount root partition on usb key will be compiled in.

    My menu.lst below:
    title Linux
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.28.4 rootdelay=10 root=/dev/sda1
    boot

    I'm getting kernel panic at the init:
    VFS: Mounted root (ext2 filesystem) readonly
    Freeing unused kernel memory: 460k freed
    Kernel panic - not syncing: No init found. Try passing init= option to kernel

    So I've copied /bin/sh to my usb /bin/sh and added init=/bin/sh to kernel line in grub's menu.lst, still getting a kernel panic:
    VFS: Mounted root (ext2 filesystem) readonly
    Freeing unused kernel memory: 460k freed
    Failed to execute /bin/sh. Attempting defaults...
    Kernel panic - not syncing: No init found. Try passing init= option to kernel

    Can anyone please help me to get to single user mode?

    Cheers,
    Tomas

  2. #2
    Just Joined!
    Join Date
    Feb 2009
    Posts
    2
    sorted out. I had no /lib directory ldd /bin/bash showed that I'm missing some libraries, tested running
    chroot /media/disk /bin/bash worked also worked as init.

Posting Permissions

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