dd command

law man
  • law man

    law man - 2008-09-13


    until you are able to adapt gujin to boot from iso files like isoemu does, is there a way to use the linux dd command to copy a partition into a file.

    i'm thinking:

    1. put iso onto a partition using cat command

    2. then put partition into a file using dd command

    i just don't know the exact command to use in dd.  i've tried dd if=/dev/sda5 of=myiso.bdi

    but it doesn't work when i try to boot the bdi from gujin


    • Benny

      Benny - 2008-09-13

      hi lawman,

      I spent a lot of time on the project "multiboot cd/DVD/USBdrive" (I am not sure you have the same goal) and I learned the dd way can work if after that copy you CUSTOMIZE each root directory of the involved installations and in addition you have to play with grub adding each single boot configuration.
      I abandoned this way because long to debug and even more to mantain when new releases are issued.

      I then moved to gujin for its ability to detect and boot direct from iso files.


      as Etienne explained several times (THANKS for your patience!) the issue is within the ISO file and the new kernel when wakes up by gujin cannot find the path it expects and fails.

      So the solution has to be delivered by each single distribution team.

      As you see I am here sitting along the river...


    • Etienne LORRAIN

      Etienne LORRAIN - 2008-09-16

      Thanks Benny for replying, my answer would have been the same.

      Just to add that you can directly use "cat" for copying a CDROM to an image file like "cat /dev/cdrom > myiso.iso", using "dd" usually just try to put the file as a contiguous file.
      Gujin needs contigous files for BDI, but right now you need a FAT filesystem on BDI files, not ISO9660 like CDROMs.
      Using partition guaranties to have contiguous data.

      Note that, as an unrelated thread, I have found out why some
      SELinux enabled distributions have difficulties creating contiguous files on EXT2/3 filesystems: you need to have an inode size of 256 bytes (instead of the default 128 bytes on Fedora 8 and before) else the extended attributes do not fit in the inode and so are stored as a hidden block on disk, hidden block which is often positionned in the middle of the file you are trying to write - so the file ends up non contiguous. A Fedora 8 installation upgraded to Fedora 9 will probably have kept a 128 bytes inode, unlike a fresh Fedora 9 installation.



Log in to post a comment.