Results 1 to 3 of 3

Thread: Problems with custom kernel: "/linuxrc: cannot create..

  1. #1
    Junior Member
    Join Date
    Nov 2003
    Location
    USA
    Posts
    2

    Problems with custom kernel: "/linuxrc: cannot create..

    I am remastering Knoppix to produce a demo disk for some kernel monitoring software I have been developing. As a first step, I am just trying to remaster with a kernel I compiled using the configuration file in /boot of the Knoppix CD (v3.3 2003/09/22 EN). I have read through the Knoppix Custom Kernel Howto and have followed the directions. These are the general steps I took (details available on demand):

    1. Installed new kernel and cloop module using dpkg (in chroot environment)
    2. Added an entry in lilo.conf for new kernel (in chroot environment)
    3. Remastered miniroot.gz with modules from above kernel
    4. Remastered boot.img with above kernel
    5. Install boot.img on floppy and reboot (/cdrom files on root of /dev/hda4)


    Syslinux uncompresses miniroot and starts to boot vmlinuz. When linuxrc gets to "Creating directories and symlinks on ramdisk..." it dies with the following error messages:

    Code:
    /linuxrc: cannot create /etc/ioctl.save: file system full
    FAT: bogus logical sector size 61440
    Kernel panic: VFS: Unable to mount root fs on 03:01
    The custom kernel howto says that changing the size of miniroot causes problems (although not specifically this problem), so I kept the same size when I used dd to create the empty file to be mounted as miniroot. (I had to increase the number of inodes to 1024 when creating the file system so I wouldn't run out when copying things onto it.) I don't think that is the problem either. In fact, I have no idea what the problem is or how to look for it. I have been stuck on this problem for over a week. I would greatly appreciate any help you can give. If there is a more detailed explanation of how to install a custom kernel on Knoppix, I would appreciate knowing about that too.

    BTW, my ultimate goal is to be able to select at boot time the original kernel or the kernel with my monitoring instrumentation in it. Does anyone know how to create boot floppies that can do that or will I have to go with isolinux? Is there a way to boot using isolinux without having to burn a CD each time? (My mastering machine does not have a CD-R/RW drive in it so I would need to move everything to another machine if I need to burn a CD each time. Not to mention that burning CDs are a bother... CD-RWs take a long time to erase.)

    Mark

  2. #2
    Junior Member
    Join Date
    Nov 2003
    Posts
    6
    Do you know whether the problem is with the kernel you've compiled or with the method you are remastering boot.img.

    Try remaster boot.img and change something other than the kernel.
    (like the image or something)

    >>BTW, my ultimate goal is to be able to select at boot time the original kernel or the kernel with my monitoring instrumentation in it.<<

    Why not just use lilo?

  3. #3
    Junior Member
    Join Date
    Nov 2003
    Location
    USA
    Posts
    2
    Quote Originally Posted by boochaka
    Do you know whether the problem is with the kernel you've compiled or with the method you are remastering boot.img.

    Try remaster boot.img and change something other than the kernel.
    (like the image or something)
    Thank you for your reply.

    I have had no problem changing the background image in syslinux or Knoppix. I have also had no problems adding or deleting packages (as long as I remain within 700 MB total). Where I am having trouble is in creating the boot floppy. Somewhere along the line, something is getting foobar'd.

    I rebuilt miniroot and the boot floppy using the files from the Knoppix boot floppy (rather than the new kernel files I compiled) using the following commands:

    Code:
    ### As root (in RC shell):
    
    # Step 1: mount old boot image and miniroot
    mkdir -p old/boot old/initrd
    cp -p /KNOPPIX/boot.img old
    cd old
    mount -t msdos -o rw,loop boot.img boot
    zcat boot/miniroot.gz > miniroot
    mount -t ext2 -o rw,loop miniroot initrd
    cd ..
    
    # Step 2: create new miniroot
    mkdir -p new/boot new/initrd
    cd new
    dd 'if=/dev/zero' 'of=miniroot' 'bs=3004k' 'count=1'
    mke2fs -N 1024 -m 0 miniroot
    mount -t ext2 -o rw,loop miniroot initrd
    rmdir initrd/lost+found
    @{cd ../old/initrd;tar cf - *} | @{cd initrd;tar xpf -}
    diff -qr ../old/initrd initrd # Only differences are special files and symlinks
    umount initrd
    umount ../old/initrd
    gzip -9 -c miniroot > miniroot.gz
    
    # Step 3: create new boot image
    dd 'if=/dev/zero' 'of=boot.img' 'bs=1440k' 'count=1'
    mkdosfs boot.img
    mount -t msdos -o rw,loop boot.img boot
    @{cd ../old/boot;sudo tar cf - boot.msg f2 german.kbd logo.16 syslinux.cfg \
      vmlinuz} | @{cd boot;sudo tar xpf -}
    cp -p miniroot.gz boot
    umount boot
    syslinux boot.img
    mount -t msdos -o ro,loop boot.img boot
    diff -qr ../old/boot boot # Only differences are ldlinux.sys and miniroot.gz
    umount boot
    umount ../old/boot
    cd ..
    
    # Step 4: create boot floppy and reboot
    cd new
    dd 'if=boot.img' 'of=/dev/fd0' 'bs=1440k' 'count=1'
    reboot
    
    ### Result:
    # Right after the boot message:
    #  Creating directories and symlinks on ramdisk...
    # the following error message occurs:
    #  /linuxrc: cannot create /etc/ioctl.save: file system full
    #  FAT: bogus logical sector size 0
    #  Kernel panic: VFS: Unable to mount root fs on 01:01
    I also tried rebuilding just the boot floppy (steps 3 & 4) but using the original miniroot.gz file. This seems to work fine. Therefore, my problem appears to be in creating miniroot.gz. I will look at it again tonight. In the mean time, if anyone has suggestions...

    Mark

Similar Threads

  1. minrt26 modules for custom kernel and linuxrc problem.
    By marksalot in forum Customising & Remastering
    Replies: 0
    Last Post: 05-11-2005, 09:53 PM
  2. "Save KNOPPIX configuration" and custom fonts
    By gwj in forum Hdd Install / Debian / Apt
    Replies: 3
    Last Post: 02-13-2005, 08:10 PM
  3. "Cannot create regular file" ":Invalid Argume
    By bluedevlx in forum General Support
    Replies: 3
    Last Post: 11-02-2004, 01:22 AM
  4. Recompiling Custom Kernel - Lots of problems....
    By toltech in forum Customising & Remastering
    Replies: 1
    Last Post: 03-16-2004, 10:52 PM
  5. Create custom home enviroment at boot (all from cd !!)
    By ktheking in forum Customising & Remastering
    Replies: 7
    Last Post: 04-07-2003, 03:43 PM

Posting Permissions

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


Cisco 10-2456-03 Genuine Cisco SFP-10G-LRM V03 10GBASE-LRM SFP+Transceiver picture

Cisco 10-2456-03 Genuine Cisco SFP-10G-LRM V03 10GBASE-LRM SFP+Transceiver

$21.24



Cisco GLC-FE-100FX-RGD 100BASE-FX SFP Transceiver Module picture

Cisco GLC-FE-100FX-RGD 100BASE-FX SFP Transceiver Module

$17.99



Lot of 10pcs Brocade 57-1000012-01 8Gbps SWL 850nm SFP+ Optical Transceivers picture

Lot of 10pcs Brocade 57-1000012-01 8Gbps SWL 850nm SFP+ Optical Transceivers

$19.00



Extreme Networks 25G SFP28 SR Lite-FEC 850nm 10502 AVAGO AFBR-725TMZ-EX1 picture

Extreme Networks 25G SFP28 SR Lite-FEC 850nm 10502 AVAGO AFBR-725TMZ-EX1

$109.00



Genuine Cisco SFP-10G-SR V03 10GBASE-SR SFP+ Transceiver Module 10-2415-03  picture

Genuine Cisco SFP-10G-SR V03 10GBASE-SR SFP+ Transceiver Module 10-2415-03

$8.00



SFP-10G-SR Original Cisco 10GBASE-SR SFP+ V02 Multi mode Transceiver 10-2415-02 picture

SFP-10G-SR Original Cisco 10GBASE-SR SFP+ V02 Multi mode Transceiver 10-2415-02

$5.00



Brand New Cisco GLC-LH-SMD 1000BASE-LX/LH SFP Module 1310nm 10km SMF LC picture

Brand New Cisco GLC-LH-SMD 1000BASE-LX/LH SFP Module 1310nm 10km SMF LC

$13.89



Genuine Cisco GLC-TE 30-1475-01 V01 1000BASE-T SFP COPPER RJ-45 100M TRANSCEIVER picture

Genuine Cisco GLC-TE 30-1475-01 V01 1000BASE-T SFP COPPER RJ-45 100M TRANSCEIVER

$11.90



New HP HPE Aruba J9150D 10G SFP+ LC SR 850nm 300m MMF XCVR Transceiver Module picture

New HP HPE Aruba J9150D 10G SFP+ LC SR 850nm 300m MMF XCVR Transceiver Module

$49.99



10 PCS Cisco GLC-LH-SMD 10-2625-01 1310nm SFP Transceiver Module picture

10 PCS Cisco GLC-LH-SMD 10-2625-01 1310nm SFP Transceiver Module

$85.00