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
  •  


INTEL CORE I5-14400 2.5GHZ PROCESSOR | SRN3Q picture

INTEL CORE I5-14400 2.5GHZ PROCESSOR | SRN3Q

$169.99



Intel - Core i9-14900K 14th Gen 24-Core 32-Thread - 4.4GHz (6.0GHz Turbo) Soc... picture

Intel - Core i9-14900K 14th Gen 24-Core 32-Thread - 4.4GHz (6.0GHz Turbo) Soc...

$546.99



Intel - Core i7-14700K 14th Gen 20-Core 28-Thread - 4.3GHz (5.6GHz Turbo) Soc... picture

Intel - Core i7-14700K 14th Gen 20-Core 28-Thread - 4.3GHz (5.6GHz Turbo) Soc...

$444.99



Intel Core i7-14700K Processor (5.5 GHz, 20 Cores, LGA 1700) BX8071514700K, OEM picture

Intel Core i7-14700K Processor (5.5 GHz, 20 Cores, LGA 1700) BX8071514700K, OEM

$339.99



AMD Ryzen 7 7700X Processor 4.5GHz 8-Core 16-Thread Socket AM5 Raphael SEALED... picture

AMD Ryzen 7 7700X Processor 4.5GHz 8-Core 16-Thread Socket AM5 Raphael SEALED...

$197.65



Intel Core i7-13700K Processor (5.4 GHz, 16 Cores, LGA 1700) Box-BX8071513700K.. picture

Intel Core i7-13700K Processor (5.4 GHz, 16 Cores, LGA 1700) Box-BX8071513700K..

$199.47



Intel Core i5-12400F - 6-Core 2.5GHz 12th Gen Alder Lake LGA 1700 65W CPU picture

Intel Core i5-12400F - 6-Core 2.5GHz 12th Gen Alder Lake LGA 1700 65W CPU

$118.84



AMD Ryzen 5 7600x Processor (5.3 GHz, 6 Cores, LGA 1718/Socket AM5) NEW OEM Tray picture

AMD Ryzen 5 7600x Processor (5.3 GHz, 6 Cores, LGA 1718/Socket AM5) NEW OEM Tray

$169.98



LOT OF 21 Intel Xeon E3-1241v3 3.50GHz Quad Core FCLGA1150 Server Processor picture

LOT OF 21 Intel Xeon E3-1241v3 3.50GHz Quad Core FCLGA1150 Server Processor

$274.95



** Intel i3 10100F CPU Processor - USED  ** picture

** Intel i3 10100F CPU Processor - USED **

$47.99