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
  •  


ORICO Multi Bay RAID Hard Drive Enclosure USB 3.0/ Type-C For 2.5/3.5'' HDD SSDs picture

ORICO Multi Bay RAID Hard Drive Enclosure USB 3.0/ Type-C For 2.5/3.5'' HDD SSDs

$239.99



ACASIS 2.5/3.5 inch 2 Bay SATA USB 3.0 Hard Drive Disk HDD SSD Enclosure 4 RAID picture

ACASIS 2.5/3.5 inch 2 Bay SATA USB 3.0 Hard Drive Disk HDD SSD Enclosure 4 RAID

$55.45



Dell 7H4CN PERC H730P Raid Controller Mini Mono12GBPS 2GB NV Cache picture

Dell 7H4CN PERC H730P Raid Controller Mini Mono12GBPS 2GB NV Cache

$44.99



Yottamaster 2 Bay USB 3.1 RAID Hard Drive Enclosure For 2.5

Yottamaster 2 Bay USB 3.1 RAID Hard Drive Enclosure For 2.5" SATA HDD SSD UASP

$59.99



Inspur LSI YZCA-00424-101 Raid Card 12Gbps HBA Controller Low Profile 9300-8i IT picture

Inspur LSI YZCA-00424-101 Raid Card 12Gbps HBA Controller Low Profile 9300-8i IT

$15.98



LSI MegaRAID 9361-8i 12Gbps PCIe 3 x8 SATA SAS 3 8 Port RAID + BBU & CacheVault picture

LSI MegaRAID 9361-8i 12Gbps PCIe 3 x8 SATA SAS 3 8 Port RAID + BBU & CacheVault

$39.00



Dell PERC H330 PCIe 3.0 x8 RAID Storage Controller 04Y5H1 High Profile picture

Dell PERC H330 PCIe 3.0 x8 RAID Storage Controller 04Y5H1 High Profile

$13.99



LSI Mr SAS 9361-8i 03-25420-14B SAS/SATA LP Raid Controller No Battery picture

LSI Mr SAS 9361-8i 03-25420-14B SAS/SATA LP Raid Controller No Battery

$29.99



Dell PERC V10 Z0017A SAS-SATA RAID Controller Card No Bracket N4C2D 5R10N picture

Dell PERC V10 Z0017A SAS-SATA RAID Controller Card No Bracket N4C2D 5R10N

$52.97



Dell 44GNF PERC H730 PCIe 3.0 x8 1GB Cache RAID Controller w/ Batt     27-3 picture

Dell 44GNF PERC H730 PCIe 3.0 x8 1GB Cache RAID Controller w/ Batt 27-3

$34.99