Linux Mint 13: Grub2 ISO Loopback Not Working?

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
breaker

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

Post by breaker »

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/linuxm ... -32win.iso

Cinnamon soon (promise) :)
DenisBernard

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

Post by DenisBernard »

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.
User avatar
karlchen
Level 23
Level 23
Posts: 18157
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

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

Post by karlchen »

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
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 750 days now.
Lifeline
breaker

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

Post by breaker »

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/linuxm ... -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.
caribriz

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

Post by caribriz »

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
amaro

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

Post by amaro »

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!
breaker

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

Post by breaker »

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... :?
caribriz

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

Post by caribriz »

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
amaro

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

Post by amaro »

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

Thanks to caribriz and karlchen (http://forums.linuxmint.com/viewtopic.php?f=42&t=113593) and special thanks to breaker!
breaker

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

Post by breaker »

I am happy the script helped someone. I actually spent hours getting it correct and just the way I wanted it. :wink:
Lophiomys

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

Post by Lophiomys »

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
User avatar
karlchen
Level 23
Level 23
Posts: 18157
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

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

Post by karlchen »

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
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 750 days now.
Lifeline
Lophiomys

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

Post by Lophiomys »

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
Marcrob12

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

Post by Marcrob12 »

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

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

Post by Marcrob12 »

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.
F3d3

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

Post by F3d3 »

Hi everyone, someone could post a fixed iso (mate or cinnamon makes no difference), because no one is seeding and the dropbox link doesn't exist anymore..Thank you
Locked

Return to “Installation & Boot”