Results 1 to 10 of 10

Thread: Getting the ramdrive to mount as root on 2.6.12 linuxsh

                  
   
  1. #1
    DCEmu Newbie
    Join Date
    May 2005
    Posts
    94
    Rep Power
    0

    Default Getting the ramdrive to mount as root on 2.6.12 linuxsh

    Hi I recently used Kegel's crosstool to build linuxsh against stock kernel 2.6.12.3
    I used the sh-boot tree from the sourceforge linuxsh CVS patched with:
    http://www.linuxdevices.com/files/ar...0831-1455.diff
    According to the sh-boot/tools/dreamcast/README the initrd ramdisk image is loaded at 0x8c800000. So I created a ramdisk by doing:

    # dd if=/dev/zero of=initrd.img bs=1k count=4096
    # mke2fs -F -vm0 initrd.img
    # mkdir initrd.dir
    # mount -o loop initrd.img initrd.dir
    # (cd initrd ; tar cf - .) | (cd initrd.dir ; tar xvf -)
    # umount initrd.dir
    # gzip -c -9 initrd.img > initrd.bin

    The "initrd" folder contains the rootfs for the ramdisk and is about 1.9megs.
    The only compiled is busybox 1.0. Other stuff are the kernel modules and the device nodes.

    Ext2 support is builtin and I configured the kernel to make 1 ramdisk of 4096kbytes.

    My init command string: root=/dev/ram0 rw rootfstype=ext2
    initrd=0x8c001010,4M mem=16

    When I copy both the kernel zImage (as zImage.bin) and the initrd.bin to the sh-boot/tools/dreamcast/ dir and do a make scramble kernel-boot.bin, it will not show any errors.

    However when I load it on my dreamcast it crashes with:

    "RAMDISK: Couldn't find valid RAM disk image
    starting at 0.
    Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-
    block(1,0)"

    Any ideas?

  2. #2
    DCEmu Dreamcast ron's Avatar
    Join Date
    Apr 2004
    Location
    MadriDC
    Age
    23
    Posts
    402
    Rep Power
    75
    SH4 Risc LittleEndian

  3. #3
    DCEmu Newbie
    Join Date
    May 2005
    Posts
    94
    Rep Power
    0

    Default

    Thanks alot, those pages reminded me that I needed to make the dev/ram nodes
    I'll soon make a dclinux disc with all kinds of fun stuff to play with

  4. #4

    Default Dreamcast LinuxSH 2.6

    Quote Originally Posted by Masta-G
    Hi I recently used Kegel's crosstool to build linuxsh against stock kernel 2.6.12.3
    I've made the first CD Cover for your upcoming LinuxSH 2.6 release (attached)!

    Thanks for the awesome news!

  5. #5

    Default

    For the image try to put the things that eat less resources, i want vim there :P

    about the cover, put also a GNU http://www.gnu.org (Mr. Stallman gets angry allways he hears Linux instead of GNU/Linux :P) . Remember that Linux it's just only the kernel ;-)

    Perhaps you can use this image : http://thelinuxfr.org/modules/xcgal/...m&cat=&pos=-35

    thnks

  6. #6
    DCEmu Newbie
    Join Date
    May 2005
    Posts
    94
    Rep Power
    0

    Default

    thats awesome work bro
    im not a real coder btw.
    we should all thank zx80user, lethal, wmat and all other folks of the linuxsh team!
    expect something nice in the near future

  7. #7

    Default

    Woo hoo!

    Thanks to the LinuxSH team and the Dreamcast porting team.

    I am going to enjoy booting and using LinuxSH on the dreamcast.

  8. #8

    Default

    Quote Originally Posted by Masta-G
    Hi I recently used Kegel's crosstool to build linuxsh against stock kernel 2.6.12.3
    I used the sh-boot tree from the sourceforge linuxsh CVS patched with:
    http://www.linuxdevices.com/files/ar...0831-1455.diff
    According to the sh-boot/tools/dreamcast/README the initrd ramdisk image is loaded at 0x8c800000. So I created a ramdisk by doing:

    # dd if=/dev/zero of=initrd.img bs=1k count=4096
    # mke2fs -F -vm0 initrd.img
    # mkdir initrd.dir
    # mount -o loop initrd.img initrd.dir
    # (cd initrd ; tar cf - .) | (cd initrd.dir ; tar xvf -)
    # umount initrd.dir
    # gzip -c -9 initrd.img > initrd.bin

    The "initrd" folder contains the rootfs for the ramdisk and is about 1.9megs.
    The only compiled is busybox 1.0. Other stuff are the kernel modules and the device nodes.

    Ext2 support is builtin and I configured the kernel to make 1 ramdisk of 4096kbytes.

    My init command string: root=/dev/ram0 rw rootfstype=ext2
    initrd=0x8c001010,4M mem=16

    When I copy both the kernel zImage (as zImage.bin) and the initrd.bin to the sh-boot/tools/dreamcast/ dir and do a make scramble kernel-boot.bin, it will not show any errors.

    However when I load it on my dreamcast it crashes with:

    "RAMDISK: Couldn't find valid RAM disk image
    starting at 0.
    Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-
    block(1,0)"

    Any ideas?
    I have exactly the same problem and may be you can help me because your post is from the last year.

    Thanks a lot,
    Mathieu SCHROETER

  9. #9
    DCEmu Newbie
    Join Date
    May 2005
    Posts
    94
    Rep Power
    0

    Default

    yeah definitly
    I recently bought a broadband adapter from ebay so i'm using nfs now. But you can use the initramfs method which works much better compared to the seperate initrd ramdisk.
    Asuming you are going to run busybox on the dreamcast you have to specify the initramfs source files path to the busybox installation dir in the kernel config. There should be at least a /dev/console and /dev/null node.
    Don't put a root= option in the kernel command line, instead only use the init= option, for example init=/linuxrc. The initramfs source files will be compiled into the zImage and it will mount as root during boottime. After the zImage has been compiled you can try it out by sending and executing it on dcload. dcload -t /dev/ttyS0 -x arch/sh/boot/zImage -n. If you want to make a 1ST_READ.BIN for booting from cdr just get the latest sh-boot tree from the linuxsh cvs. It has the option to skip the use of a initrd ramdisk (since initramfs is already compiled into the kernel).
    For more info have a look at the sh-linux wiki at http://linuxsh.sf.net/

    Good luck bro

  10. #10

    Default

    Thanks for your answer!
    Yes I use sh-boot and the linuxsh.. I have tested the initramfs and now it works fine. Just that it works with the initramsfs and dc-load only if I "make kernel-boot.bin" before the upload.
    If I use the zImage, there is an memory address error.
    And for busybox it is all good.

    Still problems with the last linux-2.6.17 and the DMA Channel for the Dreamcast.. It breaks the pvr2fb driver and it is necessary for use the AICA Sound driver. I have make patches for test the sound but there are still errors..
    But it is an other story ;-)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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