How can I boot an iso with grub4dos?

Using applications, configuring, problems
Message
Author
User avatar
session
Posts: 89
Joined: Mon 07 Feb 2011, 23:11
Location: Valley of the Sun

#61 Post by session »

I wrote:Using grub4dos, can I boot a Debian-based distribution from the hard drive (extracted from iso or not)...
This will do it, with filesytem.squashfs, initrd.lz, and vmlinuz in the live media path:

Code: Select all

title LMDE extracted
  kernel /frugal-debian/vmlinuz boot=live config live-media-path=/frugal-debian
  initrd /frugal-debian/initrd.lz
...if and only if you also place the hidden .disk folder from the iso to the top level of the hard drive.
[color=green]Primary[/color] - Intel Pentium 4 2.40GHz, 571MB RAM, ATI Radeon 7000. Linux Mint 17 Qiana installed.
[color=blue]Secondary[/color] - Pentium 3 533MHz, 385MB RAM, ATI Rage 128 Pro ULTRA TF. Precise Puppy 5.7.1 Retro full install.

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

frugal install of lubuntu livecd on ntfs hd using grub4dos

#62 Post by mcewanw »

session wrote: It took trial-and-error, but Ubuntu live-cd variants can be booted with grub4dos similarly:

Code: Select all

title Frugal Ubuntu
  kernel /frugal-ubuntu/vmlinuz boot=casper iso-scan/filename=/frugal-ubuntu/frugal-ubuntu.iso
  initrd /frugal-ubuntu/initrd.lz
...as long as vmlinuz and initrd are extracted from the .iso and correctly pointed to in menu.lst
That worked fine, thanks. I have my lubuntu iso on the third partition of my ntfs formatted hd, so successfully using your formula with:

Code: Select all

title Frugal Lubuntu
  kernel (hd0,2)/frugal-ubuntu/vmlinuz boot=casper iso-scan/filename=/frugal-ubuntu/lubuntu-13.10-desktop-i386.iso
  initrd (hd0,2)/frugal-ubuntu/initrd.lz
  boot
I guess the above will work with wattOS too: http://www.planetwatt.com/
github mcewanw

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

Can't get persistence to work with casper-rw file on hd

#63 Post by mcewanw »

I have a problem with above lubuntu iso booting method though: I can't get persistence to work when casper-rw file is stored on an ntfs formatted hard drive partition. If I create the file casper-rw and place it in /dev/sda3 (the ntfs hard drive partition where I have live lubuntu) it doesn't get detected at boot time. i.e. no persistence even though i have the word "persistent" at the end of the menu.lst kernel line. I've tried storing it in /dev/sda1 (which is also ntfs) but not recognised there either.

I do get persistence if I move the casper-rw file onto a usb drive however... But I don't want that - rather, I want persistence when casper-rw file is on same harddrive partition the lubuntu iso is stored. Apparently, casper-rw isn't being recognised at boot time when I store it on the harddrive partition.

Anyone know how to do get the harddrive stored casper-rw recognised so that persistence will work? Really a question for lubuntu forums I suppose, though it otherwise fits this thread and might be relevant to save files generally.

EDIT: Seems that casper-rw has to be on an ext... or fat partition not ntfs so that it is visible during boot according to my interpretation of:

https://help.ubuntu.com/community/LiveCD/Persistence.
The file must be named casper-rw and must be on the root of a partition. This partition can be any type that can be mounted automatically (e.g. vfat or ext3)
That would explain why it worked when I put casper-rw on a usb flash stick...

That is a pity... I want it on the ntfs hard drive...

EDIT: Of course, I could avoid having to copy vmlinuz etc out of the iso by using map commands and so on aka Easy2boot or Isoloader as described here:
http://www.rmprepusb.com/tutorials/72-- ... o-maintain.
http://murga-linux.com/puppy/viewtopic. ... 458#682458.
http://www.murga-linux.com/puppy/viewto ... =122987820.
Actually, I think a similar partnew/map technique might allow casper-rw to be found on hd but I've still to try this using empty partition table entry. I will report back if I ever manage.
Last edited by mcewanw on Sat 21 Dec 2013, 03:06, edited 1 time in total.
github mcewanw

gcmartin

#64 Post by gcmartin »


mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

getting casper-rw file recognised on ntfs hd

#65 Post by mcewanw »

gcmartin wrote:Hope this helps
Sorry, I didn't see what that website had to do with iso booting with grub4dos - though I just had a quick glance at it.

I have however elsewhere found the method to use a lubuntu casper-rw file on ntfs, though I haven't tried it yet (too risky till my 2 year old is sleeping; have to use grub4dos partnew command with care because it writes to the partition table). Needs an empty partition table entry to point at the casper-rw file. My netbook has the first three partitions already occupied, all ntfs partitions and Win 7, so I want to make a back up of the boot sector/mbr stuff before trying this:

http://www.rmprepusb.com/tutorials/ubuntu
PLEASE NOTE: Many linux versions (including Ubuntu) will not automatically mount a persistent filesystem if it is a file on an NTFS filesystem (i.e. if your casper-rw is file on an NTFS USB drive then it won't work!)

However, there is a way around this.

First create your casper-rw file as explained in Step 5 - you MUST create the Ext2 file as casper-rw as this also sets the volume name of the filesystem to casper-rw.
Next rename the casper-rw file to a suitable name (e.g. Ubuntu1204-rw) - this step is optional but it avoids any other linux you have trying to use casper-rw - you can thus have many linux ISOs that all try to use 'casper-rw' on the same USB boot drive.
Ensure that the fle is contiguous (run RMPrepUSB - Ctrl+F2 on the drive)
Now add an extra line to the beginning of your grub4dos menu as a line just under the title line, as follows:

partnew (hd0,3) 0x0 //ubuntu1204-rw


IMPORTANT: This will wipe the 4th partition entry of your boot disk! Make sure that the 4th partition table is empty (use RMPrepUSB - Drive Info - 0 to check).
github mcewanw

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

Re: frugal install of lubuntu livecd on ntfs hd using grub4dos

#66 Post by mcewanw »

session wrote: It took trial-and-error, but Ubuntu live-cd variants can be booted with grub4dos similarly:
...
...as long as vmlinuz and initrd are extracted from the .iso and correctly pointed to in menu.lst
The following booted successfully without requiring vmlinuz and initrd.lz being extracted from the iso. From http://www.rmprepusb.com/tutorials/ubuntu (modified for the lubuntu iso I am using):

Code: Select all

title frugal lubuntu method2
find --set-root /frugal-ubuntu/lubuntu-13.10-desktop-i386.iso
map /frugal-ubuntu/lubuntu-13.10-desktop-i386.iso (0xff) || map --mem /frugal-ubuntu/lubuntu-13.10-desktop-i386.iso (0xff)
map --hook
root (0xff)
kernel /casper/vmlinuz  file=/cdrom/preseed/lubuntu.seed noprompt boot=casper persistent iso-scan/filename=/frugal-ubuntu/lubuntu-13.10-desktop-i386.iso quiet splash --
initrd /casper/initrd.lz
Note, however, that session's method above doesn't require the iso to be stored contiguously on the disk (though it may be best if it is...). This second method, however, uses up a lot of RAM if the iso isn't stored contiguously, though it will also still boot. That's because the map --mem line causes the whole iso to be copied into RAM to make it a contiguous whole should it not be contiguous on the harddrive itself:

Code: Select all

map /frugal-ubuntu/lubuntu-13.10-desktop-i386.iso (0xff) || map --mem /frugal-ubuntu/lubuntu-13.10-desktop-i386.iso (0xff)
Note from the above that on my system I have the lubuntu live-cd iso stored in subdirectory /frugal-ubuntu of the ntfs partition (/dev/sda3) I'm booting lubuntu from. This partition also contains Windows 7, which came with the system. I used bcdedit to add grub4dos to the win7 boot process (as is nicely described in ICPUG's Lin'N'Win website): http://www.icpug.org.uk/national/linnwin/step2-7.htm

I still haven't added the partnew grub4dos lines to allow the casper-rw file to be stored on the ntfs formatted hard-drive. I'm working up to trying that. I'll use wincontig to fix the non-contiguous iso file first: http://wincontig.mdtzone.it/en/
github mcewanw

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#67 Post by mcewanw »

SUCCESS! Booting lubuntu live-cd iso stored in subdirectory of ntfs formatted harddrive (hd0,2 in my case, which is /dev/sda3) with persistence using casper-rw ext2 file also stored on same ntfs formatted harddrive.

3am now, so I'll write it up tomorrow.
github mcewanw

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

booting live-cd iso in ntfs hd subdirectory with grub4dos

#68 Post by mcewanw »

For my own documentation use, I've stored reasonably complete details of how I got persistence working for a casper-rw persistence file stored in a subdirectory on an ntfs formatted hd partition (along with the live-cd iso) in a howto here:

http://www.murga-linux.com/puppy/viewto ... 265#745265
github mcewanw

User avatar
session
Posts: 89
Joined: Mon 07 Feb 2011, 23:11
Location: Valley of the Sun

grub4dos and LMDE 201403

#69 Post by session »

What's up with LMDE 201403? I can't get it to boot the squashfs directly from hdd as I described with earlier versions...
[color=green]Primary[/color] - Intel Pentium 4 2.40GHz, 571MB RAM, ATI Radeon 7000. Linux Mint 17 Qiana installed.
[color=blue]Secondary[/color] - Pentium 3 533MHz, 385MB RAM, ATI Rage 128 Pro ULTRA TF. Precise Puppy 5.7.1 Retro full install.

Post Reply