Linux Mint 13: Grub2 ISO Loopback Not Working?

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Postby breaker on Thu Jul 19, 2012 1:30 am

Well, my torrent box went down while I was away, it runs Linux Mint 9, and it crashed.

Anyway, try this for now, direct download from my dropbox, download and seed too if you can; http://dl.dropbox.com/u/84584106/linuxmint-13-mate-dvd-32win.iso

Cinnamon soon (promise) :)
rtfm - read the fine manual...
Boot info script: http://ubuntuforums.org/showthread.php?t=1291280
grub2 https://help.ubuntu.com/community/Grub2
PC-BIOS based booting, mbr, boot records; http://thestarman.pcministry.com/
breaker
Level 5
Level 5
 
Posts: 613
Joined: Sun Mar 16, 2008 5:28 am

Linux Mint is funded by ads and donations.
 

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Postby DenisBernard on Tue Jul 24, 2012 1:03 pm

Just wanted to share my experience...

iso-scan/filename=... crashed for me too. After a bit of digging I got it to work. It appears that in the initrd.lz of 32bit Maya (Cinnamon), the files "/sbin/mount.ntfs" and "/sbin/mount.ntfs-3g" are corrupt.

I replaced them on my thumb drive and now it boots just fine. Here's what I did, if you're interested:

From a working linux system (I used PartedMagic), do:

1: expand the initrd.lz that you previously extracted from the iso:
7z x initrd.lz

2: Expand initrd to a tmp directory
mkdir mint
cd mint
cpio -i < ../initrd

3: replace corrupt files
cp bin/ntfs-3g sbin/mount.ntfs
cp bin/ntfs-3g sbin/mount.ntfs-3g

4: rebuild initrd
find . | cpio --create --format=newc | gzip > ../initrd.gz

5: use new initrd for booting

That worked for me, using a usb thumb drive. my method is to extract vmlinuz and initrd from iso image and use syslinux, with the following lines:

label mint13
menu label Start ^Linux Mint 13 (Maya)
kernel /linuxmint/vmlinuz
append iso-scan/filename=/linuxmint/linuxmint-13-cinnamon-dvd-32bit.iso file=/cdrom/preseed/mint.seed boot=casper initrd=/linuxmint/initrd.gz quiet splash --


Hope that helps.
DenisBernard
Level 1
Level 1
 
Posts: 1
Joined: Tue Jul 24, 2012 12:41 pm

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Postby karlchen on Tue Jul 24, 2012 4:19 pm

Goo evening, DenisBernard.

Thanks for sharing your steps with us. - If two people agree on them chances are they both may be correct. :wink: => [1] - [2]

By the way, the two files in /sbin are not corrupted, they are ELF 64-bit executables, although in fact they should be ELF 32-bit. :wink:

Cheers,
Karl
User avatar
karlchen
Level 12
Level 12
 
Posts: 4141
Joined: Sat Dec 31, 2011 7:21 am

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Postby breaker on Fri Oct 05, 2012 11:14 pm

breaker wrote:Well, my torrent box went down while I was away, it runs Linux Mint 9, and it crashed.

Anyway, try this for now, direct download from my dropbox, download and seed too if you can; http://dl.dropbox.com/u/84584106/linuxmint-13-mate-dvd-32win.iso

Cinnamon soon (promise) :)


I am posting this from Linux Mint 13, Maya, Cinnamon 32 bit iso booted via GRUB.

I worked on a script, actually 2 scripts that can be run from a Linux system to fix the existing Maya 32bit iso files.

These scripts take the Official Maya 32bit iso files, extract the contents, unpack the initrd, fix the initrd issue, repack the initrd, calculate new md5sum for the files, save the new md5sum, and remaster the iso with a new name. The md5 of the original iso is also checked for integrity and the package used to create iso files is installed if you don't already have it (genisoimage).

To use the scripts, first copy and paste the script code below into a text editor, then save it. In a terminal, give the script execute permission, the command below will do this, assume the script is named cinn32.sh (convention has one use the .sh suffix for bash scripts);

Code: Select all
chmod u+x cinn32.sh


Next put your iso in the same directory as the script. Make sure you have about 1Gig of free space, maybe a bit more on the partition.

In the terminal again, run the script as root, if you are in the same directory as the script, put a ./ before the script name;

Code: Select all
sudo ./cinn32.sh


When you are done, you will get a new iso, but it will be "owned" on your system by "root". To fix this, just chown it;

Code: Select all
sudo chown yourusername:yourusername linuxmint-13-cinnamon-dvd-32win.iso


Here are the scripts, they are basically the same except for the iso names, and md5 hashes called out at the start;

Cinnamon:
Code: Select all
IN="linuxmint-13-cinnamon-dvd-32bit.iso"      #isoname
OUT="linuxmint-13-cinnamon-dvd-32win.iso"      #new iso name
MD="913fd6c76730dac0aff87d565cbdb737"         #expected md5sum

clear
if [ -z `ls $IN` ]
   then
      echo "$IN is not here, exiting..."
      exit
fi
echo "Checking md5sum of $IN"
MD5=`md5sum $IN`
MD5=`echo $MD5 | cut -c -32`
if [ "$MD5" = "$MD" ]
   then
      echo "md5sum good!"
fi
if [ "$MD5" != "$MD" ]
   then
      echo "md5sum bad!"
      exit
fi
if [ -z `apt version genisoimage` ]
   then
      echo "genisoimage will be installed"
      aptitude install genisoimage
fi
echo "genisoimage package version" `apt version genisoimage`
echo "Please wait while iso is remastered"
ORIGDIR=`pwd`
mkdir livecdtmp && mv $IN livecdtmp
cd livecdtmp
mkdir mnt
mount -o loop $IN mnt
mkdir extract-cd
rsync -a mnt/ extract-cd   # copy cd contents to extract-cd dir
mkdir initrdtmp
rsync -a extract-cd/casper/initrd.lz .
cd initrdtmp
gunzip -dc -S .lz ../initrd.lz | cpio -imd --no-absolute-filenames
rsync -a bin/ntfs-3g sbin/mount.ntfs
rsync -a bin/ntfs-3g sbin/mount.ntfs-3g
find . | cpio -o -H newc | gzip -9 > ../initrd.lz
mv -f ../initrd.lz ../extract-cd/casper/
cd $ORIGDIR/livecdtmp/extract-cd
rm md5sum.txt
find -type f -print0 | xargs -0 md5sum | grep -v isolinux/boot.cat | tee md5sum.txt
genisoimage  -D -r -V "Linux Mint 13 MATE 32-win" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o $ORIGDIR/$OUT .
echo "cleaning up..."
umount $ORIGDIR/livecdtmp/mnt
mv $ORIGDIR/livecdtmp/$IN $ORIGDIR
cd $ORIGDIR
rm -rf livecdtmp
echo "new iso md5sum" `md5sum $OUT`


MATE:
Code: Select all
IN="linuxmint-13-mate-dvd-32bit.iso"      #isoname
OUT="linuxmint-13-mate-dvd-32win.iso"      #new iso name
MD="43ca0be4501b9d1a46fea25ec2cd556e"      #expected md5sum

clear
if [ -z `ls $IN` ]
   then
      echo "$IN is not here, exiting..."
      exit
fi
echo "Checking md5sum of $IN"
MD5=`md5sum $IN`
MD5=`echo $MD5 | cut -c -32`
if [ "$MD5" = "$MD" ]
   then
      echo "md5sum good!"
fi
if [ "$MD5" != "$MD" ]
   then
      echo "md5sum bad!"
      exit
fi
if [ -z `apt version genisoimage` ]
   then
      echo "genisoimage will be installed"
      aptitude install genisoimage
fi
echo "genisoimage package version" `apt version genisoimage`
echo "Please wait while iso is remastered"
ORIGDIR=`pwd`
mkdir livecdtmp && mv $IN livecdtmp
cd livecdtmp
mkdir mnt
mount -o loop $IN mnt
mkdir extract-cd
rsync -a mnt/ extract-cd   # copy cd contents to extract-cd dir
mkdir initrdtmp
rsync -a extract-cd/casper/initrd.lz .
cd initrdtmp
gunzip -dc -S .lz ../initrd.lz | cpio -imd --no-absolute-filenames
rsync -a bin/ntfs-3g sbin/mount.ntfs
rsync -a bin/ntfs-3g sbin/mount.ntfs-3g
find . | cpio -o -H newc | gzip -9 > ../initrd.lz
mv -f ../initrd.lz ../extract-cd/casper/
cd $ORIGDIR/livecdtmp/extract-cd
rm md5sum.txt
find -type f -print0 | xargs -0 md5sum | grep -v isolinux/boot.cat | tee md5sum.txt
genisoimage  -D -r -V "Linux Mint 13 MATE 32-win" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o $ORIGDIR/$OUT .
echo "cleaning up..."
umount $ORIGDIR/livecdtmp/mnt
mv $ORIGDIR/livecdtmp/$IN $ORIGDIR
cd $ORIGDIR
rm -rf livecdtmp
echo "new iso md5sum" `md5sum $OUT`


Let me know if you would like me to post a link to my shell script files in case you have trouble, but the copy / paste should work.

Let me know if this works for you, I spent a while testing this, and it should be fine.
rtfm - read the fine manual...
Boot info script: http://ubuntuforums.org/showthread.php?t=1291280
grub2 https://help.ubuntu.com/community/Grub2
PC-BIOS based booting, mbr, boot records; http://thestarman.pcministry.com/
breaker
Level 5
Level 5
 
Posts: 613
Joined: Sun Mar 16, 2008 5:28 am

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Postby caribriz on Sat Oct 06, 2012 4:00 am

breaker -

Have sent you a PM with details ....

Short version of the story:

As said elsewhere in this thread, I was able to boot the original 32bit isos of Cinnamon and MATE on a multiboot-usb stick with grub on my desktop pc, but only after deleting any ntfs partitions on the pc. They simply would not boot as long as the ntfs partition remained, so I deleted the partition (didn't need it), and now my pc's Mint hdd is exclusively ext4. The original isos then worked without a problem for me.

However, I recently got a laptop, on which I am dual-booting Win7 with Cinnamon - so it has ntfs partitions.
Tried booting the multiboot usb stick with original isos on the new laptop - no go.

I just ran your new scripts posted above, modified grub.cfg on the usb stick and booted with the "new" Cinnamon and MATE 32-bit isos.
I can report that they both now work perfectly, booting on the usb stick on the laptop.

Great work ..... and again - thank you for all your efforts ...

caribriz :D
Image
Desktop: C2D E6400 / Asus P5LD2SE / 2GB ram / Asus GeForce 210 / 320GB (WinXP) & 1TB (Mint - various)
Laptop: Asus A53E-SX1455V - i5 2450M / 4GB ram / Intel HD 3000 / 500GB (Win7/Mint 17.1 Cinnamon)
caribriz
Level 5
Level 5
 
Posts: 919
Joined: Mon Nov 28, 2011 7:43 am

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Postby amaro on Sat Oct 06, 2012 5:02 am

breaker -

I've read your post but I am still a newbie and not quite sure I understood everything right so I have a question:
Following this procedure will make iso which will ensure installation like with Julia/automatically inside win7 or like with Maya/through live session?
And one request:
If you have the time, could you, please, seed your linuxmint-13-mate-dvd-32win.iso!

10x!
amaro
Level 1
Level 1
 
Posts: 5
Joined: Sat Oct 06, 2012 3:36 am

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Postby breaker on Sat Oct 06, 2012 2:23 pm

amaro wrote:breaker -

I've read your post but I am still a newbie and not quite sure I understood everything right so I have a question:
Following this procedure will make iso which will ensure installation like with Julia/automatically inside win7 or like with Maya/through live session?
And one request:
If you have the time, could you, please, seed your linuxmint-13-mate-dvd-32win.iso!

10x!


It allows mint4win to work on the 32bit iso versions, so yes this would be an inside Windows installation. The live session works ok if you burn the DVD or if you use Unetbootin, but doesn't load with the original isos if you boot the iso directly using a special mode GRUB has called loopback. This fixes that also so you can use the GRUB loopback method to boot off a USB flash drive without unpacking the iso.

So, it fixed two issues....

As far as seeding, I could, but after a short while, no one else seeds... :?
rtfm - read the fine manual...
Boot info script: http://ubuntuforums.org/showthread.php?t=1291280
grub2 https://help.ubuntu.com/community/Grub2
PC-BIOS based booting, mbr, boot records; http://thestarman.pcministry.com/
breaker
Level 5
Level 5
 
Posts: 613
Joined: Sun Mar 16, 2008 5:28 am

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Postby caribriz on Sat Oct 06, 2012 10:43 pm

More success :D : both the LM13 KDE 32-bit iso and LM13 Xfce 32-bit iso now work properly for me as well.

I just changed the first three lines in the cinn32.sh file for each iso:

Linux Mint 13 KDE 32-bit iso
Code: Select all
IN="linuxmint-13-kde-dvd-32bit.iso"      #isoname
OUT="linuxmint-13-kde-dvd-32win.iso"      #new iso name
MD="ec735ea0345c07b9b28ea471eef70dcd"      #expected md5sum


Linux Mint 13 Xfce 32-bit iso
Code: Select all
IN="linuxmint-13-xfce-dvd-32bit.iso"      #isoname
OUT="linuxmint-13-xfce-dvd-32win.iso"      #new iso name
MD="721036768e95793ade27935038499e82"       #expected md5sum


Saved the files, and again followed breaker's instructions as above.
Also changed grub.cfg on the multiboot usb stick to reflect the changes in the file names for each iso.

Both now boot perfectly from my multiboot iso usb stick (on my laptop with the ntfs partitions).

caribriz
Image
Desktop: C2D E6400 / Asus P5LD2SE / 2GB ram / Asus GeForce 210 / 320GB (WinXP) & 1TB (Mint - various)
Laptop: Asus A53E-SX1455V - i5 2450M / 4GB ram / Intel HD 3000 / 500GB (Win7/Mint 17.1 Cinnamon)
caribriz
Level 5
Level 5
 
Posts: 919
Joined: Mon Nov 28, 2011 7:43 am

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Postby amaro on Sun Oct 07, 2012 10:06 am

Did it with Maya Xfce 32-bit. Works great!

Thanks to caribriz and karlchen (viewtopic.php?f=42&t=113593) and special thanks to breaker!
amaro
Level 1
Level 1
 
Posts: 5
Joined: Sat Oct 06, 2012 3:36 am

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Postby breaker on Mon Oct 08, 2012 10:50 pm

I am happy the script helped someone. I actually spent hours getting it correct and just the way I wanted it. :wink:
rtfm - read the fine manual...
Boot info script: http://ubuntuforums.org/showthread.php?t=1291280
grub2 https://help.ubuntu.com/community/Grub2
PC-BIOS based booting, mbr, boot records; http://thestarman.pcministry.com/
breaker
Level 5
Level 5
 
Posts: 613
Joined: Sun Mar 16, 2008 5:28 am

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Postby Lophiomys on Sun Dec 23, 2012 6:21 pm

I am stuck with an Grub4Dos USB Stick.
WIth the original Mint 13 KDE DVD 32bit iso and with breaker's/caribriz modified ...-32win.iso image
I get the same symptoms.
The boot screen works, selecting "Start Linux Mint" does something for a minute and ends
in the error message:
"(initramfs) Unable to find a medium containing a live file system"

Any ideas, how to fix this?
/L
Lophiomys
Level 1
Level 1
 
Posts: 17
Joined: Mon Feb 06, 2012 4:03 am

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Postby karlchen on Sun Dec 23, 2012 6:55 pm

Hello, Lophiomys.

As according to your own words, you have applied breaker's fix script to the ISO image file, chances are that the Grub4dos menu entries which are supposed to boot the ISO image are incorrect.

Kind regards,
Karl
User avatar
karlchen
Level 12
Level 12
 
Posts: 4141
Joined: Sat Dec 31, 2011 7:21 am

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Postby Lophiomys on Sun Dec 23, 2012 7:46 pm

OK,
Any hint, where to find the "correct" menu.lst commands for Mint 13 KDE?

The best I could find - and I have tried a number of variants today, is:
Code: Select all
title 5 Mint 13 KDE fixed (breaker ... -32win.iso)
find --set-root --ignore-floppies /linuxmint-13-kde-dvd-32win.iso
map --heads=0 --sectors-per-track=0 /linuxmint-13-kde-dvd-32win.iso (0xff)
map --hook
root (0xff)
chainloader (0xff)


-/L
Lophiomys
Level 1
Level 1
 
Posts: 17
Joined: Mon Feb 06, 2012 4:03 am

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Postby Marcrob12 on Tue Mar 04, 2014 10:05 am

Hi Guys first post.

I see some are having prob with grub iso booting. here's mine from USB, using to boot Petra, which at first would not boot and threw up the error of unable to find files.

All i did was add isoscan/filename=(loop)/name of iso options etc.

set timeout=18
set default=0

menuentry "Linux Mint 13 Cinnamon ISO" {
loopback loop /linuxmint-13-cinnamon-dvd-32bit.iso
linux (loop)/casper/vmlinuz file=(loop)/cdrom/preseed/mint.seed boot=casper initrd=/casper/initrd.lz iso-scan/filename=(loop)/linuxmint-13-cinnamon-dvd-32bit.iso noeject noprompt splash --
initrd (loop)/casper/initrd.lz
}

Adding (loop) before any file location makes Grub look at the loopfile seeing as the files you are booting are within the loop file. :-)
Marcrob12
Level 1
Level 1
 
Posts: 2
Joined: Tue Mar 04, 2014 9:54 am

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Postby Marcrob12 on Tue Mar 04, 2014 10:27 am

Just to add another note, which i do not see on your config files and someone has mentioned,

To usb boot the USB device and partitions becomes (hd0) on grub2, depending on how you have configured your usb mine has 2 partitions one to be used on any computer (hd0,msdos1) which is seen by every OS inc windows, the second is (hd0,msdos2) which has my boot, iso file and casper-rw image on it.

my config file includes
set root (hd0,msdos2) <this is my HDD and PARTITION I am wanting to boot from. can also use the UUID if you know it. 64bit systems i have noticed use UUID by default.

next part of your config is for the loopback

loopback loop /location of iso

Or you can use

loopback loop (hd0,msdos2)/location of iso.

then place (loop) as i did in previous post. this should boot any iso of any system as long as you use the config varables you find in the Boot directory of the ISO after you have mounted and viewed the boot config files.

Hope this helps with your iso booting. as for installing this should boot the iso as a cdrom and once the .disk file is mounted and run should be the same as using the CDROM/DVD.
Marcrob12
Level 1
Level 1
 
Posts: 2
Joined: Tue Mar 04, 2014 9:54 am

Linux Mint is funded by ads and donations.
 
Previous

Return to Installation & Boot

Who is online

Users browsing this forum: No registered users and 15 guests