Page 7 of 31 FirstFirst ... 5678917 ... LastLast
Results 61 to 70 of 302

Thread: multicd.sh - combine Linux ISOS into one

  1. #61
    Join Date
    Feb 2009
    Location
    Quebec
    Beans
    56
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: multicd.sh - combine Linux ISOS into one

    Ah - ha! That clinched it! burning now. Small test in VBox, looks ok. Perfect for school! Discovered Pendrivelinux has a version too. Too bad for wildbill's Billix, it's been superceded!


    Uh-ho, Mint is not booting...says
    Could not find ramdisk image: /casper/initrd.gz
    boot:
    Last edited by Aviendha09; March 3rd, 2010 at 11:37 PM. Reason: new problem
    "What senses do we lack, that we cannot see[...] a world all around us?" F. Herbert, DUNE

  2. #62
    Join Date
    Mar 2010
    Beans
    0

    Re: multicd.sh - combine Linux ISOS into one

    I had previously done something like this for myself to put multiple distros on a USB drive.

    As this script supports more distros than mine, I thought it best just to write a script to convert the generated multicd.iso onto my usb drive. Details are here

    http://chris.picton.nom.za/?q=node/2

    I have also patched the sysrcd and ubcd modules to keep all their files in their own subdirectories of the /boot subdirectory (to keep the USB drive clean), to put the System Rescue CD menu in a submenu by itself, and to add the version string of these to the menu

    Finally, I have changed multicd.sh to accept .ima files (like the eb_on_hd.ima file), and Allow spaces in the names of image files: Etherboot Disk.ima to keep the menu looking nice

    Let me know what you think of these patches...

    Disk Image patch:
    Code:
    diff -uNr -x /images/ -x cd2usb.sh multicd.orig/multicd.sh multicd/multicd.sh
    --- multicd.orig/multicd.sh    2010-03-07 06:07:43.000000000 +0200
    +++ multicd/multicd.sh    2010-03-10 13:07:22.000000000 +0200
    @@ -89,11 +89,11 @@
     done
     #END SCAN
     
    -for i in $( ls -1 *.im[g,z] 2> /dev/null); do
    - echo $(echo $i|sed 's/\.im.//')
    +for i in *.im[agz]; do
    + echo "$i"|sed 's/\.im.//'
     done
     GAMES=0 #Will be changed if there are games
    -for i in $( ls -1 games/*.im[g,z] 2> /dev/null ); do
    +for i in games/*.im[agz]; do
      echo Game: $(echo $i|sed 's/\.im.//'|sed 's/games\///')
      GAMES=1
     done
    @@ -146,9 +146,9 @@
     
     #The below chunk copies floppy images.
     j="0"
    -for i in $( ls -1 *.im[g,z] 2> /dev/null); do
    +for i in *.im[agz]; do
         echo -n Copying $(echo $i|sed 's/\.im.//')"... "
    -    cp $i multicd-working/boot/$j.img
    +    cp "$i" multicd-working/boot/$j.img
         if [ $VERBOSE = 1 ];then
             echo "Saved as "$j".img."
         else
    @@ -161,7 +161,7 @@
     if [ $GAMES = 1 ];then
         k="0"
         mkdir -p multicd-working/boot/games
    -    for i in $( ls -1 games/*.im[g,z] 2> /dev/null ); do
    +    for i in games/*.im[agz]; do
             echo -n Copying $(echo $i|sed 's/\.im.//'|sed 's/games\///')"... "
             cp $i multicd-working/boot/games/$k.img
             if [ $VERBOSE = 1 ];then
    @@ -249,9 +249,9 @@
     
     #BEGIN DISK IMAGE ENTRY#
     j="0"
    -for i in $( ls -1 *.im[g,z] 2> /dev/null); do
    +for i in *.im[agz]; do
       BASICNAME=$(echo $i|sed 's/\.im.//')
    -  echo label $BASICNAME >> multicd-working/boot/isolinux/isolinux.cfg
    +  echo label "$BASICNAME" >> multicd-working/boot/isolinux/isolinux.cfg
       echo kernel memdisk >> multicd-working/boot/isolinux/isolinux.cfg
       echo append initrd=/boot/$j.img >> multicd-working/boot/isolinux/isolinux.cfg
       j=$( expr $j + 1 )
    System Rescue CD patch:
    Code:
    diff -uNr -x /images/ -x cd2usb.sh multicd.orig/plugins/sysrcd.sh multicd/plugins/sysrcd.sh
    --- multicd.orig/plugins/sysrcd.sh    2010-01-03 23:00:02.000000000 +0200
    +++ multicd/plugins/sysrcd.sh    2010-03-10 11:05:37.000000000 +0200
    @@ -34,37 +34,58 @@
             umount sysrcd
         fi
         mount -o loop sysrcd.iso sysrcd/
    -    cp sysrcd/sysrcd.* multicd-working/ #Compressed filesystem
         mkdir multicd-working/boot/sysrcd
    +    cp sysrcd/sysrcd.* multicd-working/boot/sysrcd/ #Compressed filesystem
         cp sysrcd/isolinux/altker* multicd-working/boot/sysrcd/ #Kernels
         cp sysrcd/isolinux/rescue* multicd-working/boot/sysrcd/ #Kernels
         cp sysrcd/isolinux/initram.igz multicd-working/boot/sysrcd/initram.igz #Initrd
    +    cp sysrcd/version multicd-working/boot/sysrcd/version
         umount sysrcd
         rmdir sysrcd
         fi
     elif [ $1 = writecfg ];then
     if [ -f sysrcd.iso ];then
    -cat >> multicd-working/boot/isolinux/isolinux.cfg << "EOF"
    +VERSION=$(cat multicd-working/boot/sysrcd/version)
    +cat >> multicd-working/boot/isolinux/isolinux.cfg << EOF
    +label sysrcd
    +menu label ---> ^System Rescue Cd ($VERSION)
    +com32 menu.c32
    +append sysrcd.cfg
    +
    +EOF
    +
    +cat > multicd-working/boot/isolinux/sysrcd.cfg << EOF
    +menu title System Rescue CD
    +
     label rescuecd0
     menu label ^SystemRescueCd 32-bit
     kernel /boot/sysrcd/rescuecd
    -append initrd=/boot/sysrcd/initram.igz
    +append initrd=/boot/sysrcd/initram.igz subdir=/boot/sysrcd
    +
     label rescuecd1
     menu label SystemRescueCd 64-bit
     kernel /boot/sysrcd/rescue64
    -append initrd=/boot/sysrcd/initram.igz
    +append initrd=/boot/sysrcd/initram.igz subdir=/boot/sysrcd
    +
     label rescuecd2
     menu label SystemRescueCd 32-bit (alternate kernel)
     kernel /boot/sysrcd/altker32
    -append initrd=/boot/sysrcd/initram.igz video=ofonly
    +append initrd=/boot/sysrcd/initram.igz video=ofonly subdir=/boot/sysrcd
    +
     label rescuecd3
     menu label SystemRescueCd 64-bit (alternate kernel)
     kernel /boot/sysrcd/altker64
    -append initrd=/boot/sysrcd/initram.igz video=ofonly
    +append initrd=/boot/sysrcd/initram.igz video=ofonly subdir=/boot/sysrcd
    +
     label rescuecd-rootauto
     menu label SysRCD: rescue installed Linux (root=auto; 32-bit)
     kernel /boot/sysrcd/rescuecd
    -append initrd=/boot/sysrcd/initram.igz root=auto
    +append initrd=/boot/sysrcd/initram.igz root=auto subdir=/boot/sysrcd
    +
    +label back
    +menu label Back to main menu
    +com32 menu.c32
    +append isolinux.cfg
     EOF
     fi
     else
    Ultimate Boot CD Patch
    Code:
    diff -uNr -x /images/ -x cd2usb.sh multicd.orig/plugins/ubcd.sh multicd/plugins/ubcd.sh
    --- multicd.orig/plugins/ubcd.sh    2009-11-29 00:03:14.000000000 +0200
    +++ multicd/plugins/ubcd.sh    2010-03-10 11:55:44.000000000 +0200
    @@ -46,21 +46,28 @@
                 umount ubcd
             fi
             mount -o loop ubcd.iso ubcd/
    -        cp -r ubcd/dosapps multicd-working/
    -        cp -r ubcd/images multicd-working/
    -        cp -r ubcd/menus multicd-working/
    -        cp -r ubcd/boot/* multicd-working/boot/ #Some boot files needed for UBCD
    +        mkdir -p multicd-working/boot/ubcd/
    +        cp -r ubcd/dosapps multicd-working/boot/ubcd/
    +        cp -r ubcd/images multicd-working/boot/ubcd/
    +        cp -r ubcd/menus multicd-working/boot/ubcd/
    +        sed -i 's^/boot/^/boot/ubcd/boot/^g' multicd-working/boot/ubcd/menus/*
    +        sed -i 's^/menus/^/boot/ubcd/menus/^g' multicd-working/boot/ubcd/menus/*
    +        sed -i 's^/images/^/boot/ubcd/images/^g' multicd-working/boot/ubcd/menus/*
    +        cp -r ubcd/boot multicd-working/boot/ubcd/ #Some boot files needed for UBCD
             cp ubcd/isolinux/sbm.cbt multicd-working/boot/isolinux/sbm.cbt #Smart Boot Manager
    +        VERSION=$(head -n 1 ubcd/menus/defaults.cfg | awk '{ print $6 }')
    +        echo "$VERSION" > multicd-working/boot/ubcd/version
             umount ubcd
             rmdir ubcd
         fi
     elif [ $1 = writecfg ];then
     if [ -f ubcd.iso ];then
    -cat >> multicd-working/boot/isolinux/isolinux.cfg << "EOF"
    +VERSION=$(cat multicd-working/boot/ubcd/version)
    +cat >> multicd-working/boot/isolinux/isolinux.cfg << EOF
     label ubcd
    -menu label ^Ultimate Boot CD - Main menu
    +menu label ---> ^Ultimate Boot CD ($VERSION) - Main menu
     com32 menu.c32
    -append /menus/main.cfg
    +append /boot/ubcd/menus/main.cfg
     EOF
     fi
     else

  3. #63
    Join Date
    Mar 2010
    Beans
    0

    Re: multicd.sh - combine Linux ISOS into one

    Quote Originally Posted by Zirafarafa View Post
    Finally, I have changed multicd.sh to accept .ima files (like the eb_on_hd.ima file), and Allow spaces in the names of image files: Etherboot Disk.ima to keep the menu looking nice
    Just realized that the patch is not good if disk images/games do not exist - this one is better. The reason for the change from the $(ls -1 *.im[g,z]) is to support images with spaces in their names

    Disk Image patch:
    Code:
    diff -uNr -x /images/ -x cd2usb.sh multicd.orig/multicd.sh multicd/multicd.sh
    --- multicd.orig/multicd.sh    2010-03-07 06:07:43.000000000 +0200
    +++ multicd/multicd.sh    2010-03-10 15:43:55.000000000 +0200
    @@ -89,11 +89,13 @@
     done
     #END SCAN
     
    -for i in $( ls -1 *.im[g,z] 2> /dev/null); do
    - echo $(echo $i|sed 's/\.im.//')
    +for i in *.im[agz]; do
    + test "$i" = "*.im[agz]" && continue
    + echo "$i"|sed 's/\.im.//'
     done
     GAMES=0 #Will be changed if there are games
    -for i in $( ls -1 games/*.im[g,z] 2> /dev/null ); do
    +for i in games/*.im[agz]; do
    + test "$i" = "games/*.im[agz]" && continue
      echo Game: $(echo $i|sed 's/\.im.//'|sed 's/games\///')
      GAMES=1
     done
    @@ -146,9 +148,10 @@
     
     #The below chunk copies floppy images.
     j="0"
    -for i in $( ls -1 *.im[g,z] 2> /dev/null); do
    +for i in *.im[agz]; do
    +    test "$i" = "*.im[agz]" && continue
         echo -n Copying $(echo $i|sed 's/\.im.//')"... "
    -    cp $i multicd-working/boot/$j.img
    +    cp "$i" multicd-working/boot/$j.img
         if [ $VERBOSE = 1 ];then
             echo "Saved as "$j".img."
         else
    @@ -161,7 +164,8 @@
     if [ $GAMES = 1 ];then
         k="0"
         mkdir -p multicd-working/boot/games
    -    for i in $( ls -1 games/*.im[g,z] 2> /dev/null ); do
    +    for i in games/*.im[agz]; do
    +        test "$i" = "games/*.im[agz]" && continue
             echo -n Copying $(echo $i|sed 's/\.im.//'|sed 's/games\///')"... "
             cp $i multicd-working/boot/games/$k.img
             if [ $VERBOSE = 1 ];then
    @@ -249,9 +253,10 @@
     
     #BEGIN DISK IMAGE ENTRY#
     j="0"
    -for i in $( ls -1 *.im[g,z] 2> /dev/null); do
    +for i in *.im[agz]; do
    +  test "$i" = "*.im[agz]" && continue
       BASICNAME=$(echo $i|sed 's/\.im.//')
    -  echo label $BASICNAME >> multicd-working/boot/isolinux/isolinux.cfg
    +  echo label "$BASICNAME" >> multicd-working/boot/isolinux/isolinux.cfg
       echo kernel memdisk >> multicd-working/boot/isolinux/isolinux.cfg
       echo append initrd=/boot/$j.img >> multicd-working/boot/isolinux/isolinux.cfg
       j=$( expr $j + 1 )

  4. #64
    Join Date
    Apr 2007
    Location
    USA
    Beans
    1,043

    Re: multicd.sh - combine Linux ISOS into one

    I think I found another way to handle files with spaces as well as no file at all. Instead of doing
    Code:
    for i in $(ls -1 *.im[agz] 2> /dev/null);do
    I can use
    Code:
    (ls -1 *.im[agz] 2> /dev/null | while read i;do
    I haven't tested your way or mine, because I'm booted into Windows right now I'll try it out when I'm in Linux again.
    The patches will definitely be useful. Is it OK if I integrate them into the next version?

    Also, I can't believe I actually typed this:
    Code:
    echo $(echo $i|sed 's/\.im.//')
    That's like having one guy say something and getting another guy to repeat it when the first guy is right there in front of you.
    Last edited by maybeway36; March 11th, 2010 at 12:53 AM. Reason: lol

  5. #65
    Join Date
    Mar 2010
    Beans
    0

    Re: multicd.sh - combine Linux ISOS into one

    Quote Originally Posted by maybeway36 View Post
    I think I found another way to handle files with spaces as well as no file at all. Instead of doing
    Code:
    for i in $(ls -1 *.im[agz] 2> /dev/null);do
    I can use
    Code:
    (ls -1 *.im[agz] 2> /dev/null | while read i;do
    That would work just as well (With the extra '(' removed from the front).

    Alternatively,
    Code:
    for i in games/*.im[agz]; do
       test -r "$i" || continue
    will handle missing files as well as those not readable (permissions/broken symlinks/etc)

    Quote Originally Posted by maybeway36 View Post
    The patches will definitely be useful. Is it OK if I integrate them into the next version?
    Please do

  6. #66
    Join Date
    Mar 2010
    Beans
    0

    Re: multicd.sh - combine Linux ISOS into one

    With my goal of being able to put this onto a USB drive, I am trying to get the distros fuly contained within their own /boot directory on the image. This will keep the USB drive clean, as well as allow similar distros to coexist (mint/ubuntu)

    Also, I am trying to use the distros original isolinux.cfg as much as possibe in its own submenu (So that distro upgrades are less likely to affect the script)

    Do you think these are useful things to patch in your script? If so, I will work through the distros I generally use to get them patched as above.
    Last edited by Zirafarafa; March 12th, 2010 at 07:21 AM.

  7. #67
    Join Date
    Apr 2007
    Location
    USA
    Beans
    1,043

    Re: multicd.sh - combine Linux ISOS into one

    Patches like those would be quite useful. Some distros don't want to stay in their own folder, but having the script extract and edit files in the initrd.gz would be a possibility.
    I'm going to try to learn how to use git so I can set up a repository on my tuxfamily site.

  8. #68
    Join Date
    Oct 2008
    Location
    Hindustan
    Beans
    146
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: multicd.sh - combine Linux ISOS into one

    When grub2 can be used to boot multiple iso of same distro family (ubuntu, linuxmint...etc) files then why cant you replace syslinux with grub2.

  9. #69
    Join Date
    Apr 2007
    Location
    USA
    Beans
    1,043

    Re: multicd.sh - combine Linux ISOS into one

    multicd 5.3 lets you use Linux Mint and Ubuntu (and BackTrack and WeakNet Linux) on the same DVD now. The ubuntu2 plugin, which lets you add another Ubuntu 9.10+ image, has also been added. If the script finds ubuntu2.iso and you have "dialog" installed, it will ask you what to call it on the menu.
    I also set up a git repository:
    Code:
    git clone git://git.tuxfamily.org/gitroot/multicd/multicd.git
    It's pretty much the same stuff you'll get in the .tar.gz. If I add a new feature but it's not enough to justify releasing it yet, I might push it into here.

  10. #70
    Join Date
    Mar 2010
    Beans
    0

    Re: multicd.sh - combine Linux ISOS into one

    Hi

    My patch here for linuxmint (against 5.2) doesn't require initrd editing and allows all files to go into /boot/linuxmint, by using the live-media-path parameter.

    No idea yet if this will work for other ubuntu clones.

    Also, it modifies and uses the original mint isolinux.cfg in a submenu.

    Code:
    --- multicd.orig/plugins/linuxmint.sh    2010-03-11 17:12:16.000000000 +0200
    +++ multicd/plugins/linuxmint.sh    2010-03-12 15:38:22.000000000 +0200
    @@ -42,25 +42,51 @@
                 umount linuxmint
             fi
             mount -o loop linuxmint.iso linuxmint/
    -        cp -R linuxmint/casper multicd-working/ #Live system
    -        if [ -d linuxmint/drivers ];then cp -R linuxmint/drivers multicd-working/;fi #Drivers added by the Mint team
    -        cp -R linuxmint/preseed multicd-working/ #Tells the installer what to install
    +        cp -R linuxmint/casper multicd-working/boot/linuxmint #Live system
    +        if [ -d linuxmint/drivers ];then cp -R linuxmint/drivers multicd-working/;fi #Drivers added by the Mint team - not working for USB
    +        cp -R linuxmint/preseed multicd-working/boot/linuxmint #Tells the installer what to install
             cp -R linuxmint/.disk multicd-working/ #A few more helper files
    +        cp -R linuxmint/isolinux/splash.jpg multicd-working/boot/isolinux/linuxmint.jpg #A few more helper files
    +        
    +        # Fix the isolinux.cfg
    +        cp linuxmint/isolinux/isolinux.cfg multicd-working/boot/linuxmint/linuxmint.cfg
    +        sed -i 's@file=/cdrom/preseed/@file=/boot/linuxmint/preseed/@g' multicd-working/boot/linuxmint/linuxmint.cfg
    +        sed -i 's^initrd=/casper/^live-media-path=/boot/linuxmint initrd=/boot/linuxmint/^g' multicd-working/boot/linuxmint/linuxmint.cfg
    +        sed -i 's^kernel /casper/^kernel /boot/linuxmint/^g' multicd-working/boot/linuxmint/linuxmint.cfg
    +        sed -i 's^splash.jpg^linuxmint.jpg^g' multicd-working/boot/linuxmint/linuxmint.cfg
    +        mv multicd-working/.disk/casper-uuid-generic multicd-working/.disk/casper-uuid-mint
    +        
             umount linuxmint
             rmdir linuxmint
         fi
     elif [ $1 = writecfg ];then
     if [ -f linuxmint.iso ] && [ ! -f ubuntu.iso ];then
    -cat >> multicd-working/boot/isolinux/isolinux.cfg << "EOF"
    -label mint-live
    -  menu label ^Try Linux Mint without any change to your computer
    -  kernel /casper/vmlinuz
    -  append  file=/cdrom/preseed/mint.seed boot=casper initrd=/casper/initrd.gz quiet splash --
    -label mint-live-install
    -  menu label ^Install Linux Mint
    -  kernel /casper/vmlinuz
    -  append  file=/cdrom/preseed/mint.seed boot=casper only-ubiquity initrd=/casper/initrd.gz quiet splash --
    +cat >> multicd-working/boot/isolinux/isolinux.cfg << EOF
    +label linuxmint
    +menu label ---> Linux ^Mint Menu
    +com32 vesamenu.c32
    +append /boot/linuxmint/linuxmint.cfg
    +
     EOF
    +
    +cat >> multicd-working/boot/linuxmint/linuxmint.cfg << EOF
    +
    +label back
    +menu label Back to main menu
    +com32 menu.c32
    +append /boot/isolinux/isolinux.cfg
    +
    +EOF
    +
    +#label mint-live
    +#  menu label ^Try Linux Mint without any change to your computer
    +#  kernel /casper/vmlinuz
    +#  append  file=/cdrom/preseed/mint.seed boot=casper initrd=/casper/initrd.gz quiet splash --
    +#label mint-live-install
    +#  menu label ^Install Linux Mint
    +#  kernel /casper/vmlinuz
    +#  append  file=/cdrom/preseed/mint.seed boot=casper only-ubiquity initrd=/casper/initrd.gz quiet splash --
    +#EOF
     fi
     else
         echo "Usage: $0 {scan|copy|writecfg}"
    Last edited by Zirafarafa; March 17th, 2010 at 01:08 PM.

Page 7 of 31 FirstFirst ... 5678917 ... LastLast

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
  •