FedoraForum.org - Fedora Support Forums and Community
Results 1 to 8 of 8
  1. #1
    dvh Guest

    How to mount FC4 initrd via loop?

    Hi.

    I need to mount and customize initial ramdisk from Fedora Core 4, which I create with /sbin/mkinitrd tool. I try usual way but it fail:

    # mount ./initrd ./test -o loop -t ext2
    # mount ./initrd ./test -o loop -t ext3
    # mount ./initrd ./test -o loop -t minix
    # mount ./initrd ./test -o loop -t vfat
    # mount ./initrd ./test -o loop -t msdos
    # mount ./initrd ./test -o loop -t reiserfs
    # mount ./initrd ./test -o loop -t romfs
    # mount ./initrd ./test -o loop -t ramfs
    # mount ./initrd ./test -o loop -t cramfs

    I everything do as root. Both cases failed, in other distributions one of previous commands works but not in FC4. I also try do gzip -d initrd before mount but the result is the same. Can anyone help me how to mount initial ramdisk on a directory?

    dvh

  2. #2
    homey Guest
    In this example, I have /home/isolinux/initrd.img
    Code:
    EXTRACT and EDIT INITRD.IMG (The Linux Filesystem)
    
    # unpack the current initrd.img
    mkdir /home/cdimgextract
    cd /home/cdimgextract
    gzip -dc < /home/isolinux/initrd.img | cpio -i
    cd /home
    # make any changes you need to the initrd.img in cdimgextract
    
    
    REMAKE MODIFIED INITRD.IMG
    
    cd /home/cdimgextract
    # create the new initrd
    rm -f /home/isolinux/initrd.img
    find . | cpio -o -c | gzip -9 > /home/isolinux/initrd.img
    # cleanup
    cd /home
    rm -rf cdimgextract

  3. #3
    Join Date
    Jun 2005
    Age
    52
    Posts
    618
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    for creating isn't it
    find . | cpio -o | gzip -9 > /home/isolinux/initrd.img
    ?
    I don't see the -c option in the man page
    I'm glad I found this page it will help me examin the boot procedure thanks

  4. #4
    Join Date
    Jun 2005
    Age
    52
    Posts
    618
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ahhh in the help it shows up
    -c Use the old portable (ASCII) archive format

    man page needs updated

  5. #5
    Join Date
    Jun 2005
    Age
    52
    Posts
    618
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I wonder whats has the best compression
    squashfs
    cramfs
    or
    cpio compressed
    why couldn't they just use a tar archive?

  6. #6
    homey Guest
    I don't know off hand which has better compression or why tar isn't used.

  7. #7
    Join Date
    Jun 2005
    Age
    52
    Posts
    618
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I googled it I'm just amazed I've been using unix and linux for a long long time and after reading this I just learned about cpio wich I found seams to be better. Maybe tar is better for recovery purposes but cpio is smaller. Oh tar can perserve some file atributes that I don't see options for in cpio. a way around that wou'd be to create a standardized file that contained file attributes (which might be better and more flexable considering acl's and selinux info not supported by either which are both considerably new.

  8. #8
    Join Date
    Jun 2005
    Age
    52
    Posts
    618
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Kinda funny I was asking buildroot people why theres not a tar option and this blows my socks off that this is more or less what I was asking about. I could now help implement this into buildroot

Similar Threads

  1. Replies: 9
    Last Post: 5th October 2008, 11:29 AM
  2. loop mount as normal user??
    By havenoclu in forum Using Fedora
    Replies: 4
    Last Post: 16th June 2006, 07:53 PM
  3. how to mount initrd image in FC3?
    By wwraith in forum EOL (End Of Life) Versions
    Replies: 1
    Last Post: 17th January 2005, 08:28 PM

Tags for this Thread

Posting Permissions

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