All linux configuration was done using Puppy Guydog 501, which is the main distribution I run on this machine. For completeness, the grub4dos menu.lst details below include the stanza to boot my frugal Puppy Guydog, which you do not of course require to boot Lubuntu.
BACKGROUND
It is reasonably well-known and documented how to use grub4dos to boot a live-cd iso (plus file or partition for persistence) when the various required parts are stored on usb and on ext or fat-type partitions. For example:
http://www.rmprepusb.com/tutorials/72-- ... o-maintain.
http://murga-linux.com/puppy/viewtopic. ... 458#682458.
http://www.murga-linux.com/puppy/viewto ... =122987820.
This howto documents some extra steps when storing the required parts on hd and particularly for the more tricky case of an ntfs formatted hard drive partition. Note that the described details only require a working install of grub4dos and do not require the use of Easy2Boot or similar.
Most of the configuration details were found at http://www.rmprepusb.com/tutorials/ubuntu. I did not, however, download or use the program RMprepUSB at all, but did download and use "wincontig" from http://wincontig.mdtzone.it/en/, which allowed me to make sure the lubuntu live-cd iso, and the casper-rw persistence file I created, were stored contiguously (i.e. defragmented) on the underlying ntfs filesystem. Furthermore, this howto documents a few subtle extra details I found by trial and error regarding the creation of casper-rw, specifically required when stored on ntfs, which I did not find documented elsewhere, and the possibility of locating the casper-rw file in a subdirectory of the partition.
COMPUTER CONFIGURATION USED FOR THE INSTALLATION
The machine I'm doing this installation on is an emachines (Acer) netbook, which comes preinstalled with Win 7 Starter OS on ntfs formatted partition /dev/sda3, which it boots using bcd via preinstalled ntfs partition /dev/sda2. In addition, it uses ntfs partition /dev/sda1 to hold images required to rebuild the OS to factory default should that ever be required. There is thus only one unused partition entry in the MBR; that for /dev/sda4 (hd0,3), which is the one I use, via grub4dos partnew, in the menu.lst below to point to where the lubuntu casper-rw persistence file is being stored.
Note that I earlier installed grub4dos (grldr and grldr.mbr) at root of partition /dev/sda3 using bcdedit in the method nicely described on ICPUG's Lin'N'Win site (albeit not particularly for /dev/sda3 installation): http://www.icpug.org.uk/national/linnwin/step2-7.htm.
Steps Required (assuming installation to /dev/sda3 and grub4dos already successfullly installed and basically working on your machine):
1. Make directory /frugal-lubuntu on partition sda3 (which in my Guydog frugal installation was my /mnt/home).
2. Download the lubuntu live-cd iso (I used lubuntu-13.10-desktop-i386.iso) from lubuntu.net and store it in /frugal-lubuntu.
(At this stage I opened up the iso by clicking on it in the filemanager, extracted vmlinuz and initrd.lz and copied them into /frugal-lubuntu. However, that extra step is only required if booting lubuntu using Method1 in menu.lst below. It is not required for Method2).
3. Open a terminal at directory /frugal-lubuntu and create a 1 GiB ext2 formatted casper-rw file inside that directory by entering the commands:
Code: Select all
dd if=/dev/zero of=casper-rw bs=1M count=1024
followed by
mkfs.ext2 -b 4096 -F -L casper-rw casper-rw
4. Assuming you have downloaded wincontig and extracted it on an underlying MSWindows OS partition, reboot into that OS now, run wincontig from wherever you have placed it, and defragment both lubuntu-13.10-desktop-i386.iso and your newly created casper-rw file. Then reboot back to Guydog or whatever linux distribution you are using to configure this lubuntu installation.
5. Create the following grub4dos menu.lst (or extract the bits you need...). My grub4dos menu.lst is stored in root of /dev/sda3 along with grldr and grldr.img. You will need to modify this to match the partition you are using on your own machine for this lubuntu live-cd-iso installation. I am using hd0,2 (i.e. /dev/sda3) here. WARNING: Be careful with the grub4dos partnew command line entry. Make sure (carefully check) that on your system you use it to refer to a partition entry that is definitely not being used because partnew does write the new partition information so would overwrite anything already there! (personally, for my own safety, I make a backup, using dd, of my mbr/partition table before starting, though I don't document how to do that here). Use any of this at your own risk :) :
Code: Select all
###############################################
color black/cyan yellow/cyan
timeout=5
default=0
title Puppy GuyDog
kernel (hd0,2)/guydog/vmlinuz PMEDIA=idehd PDEV1=sda3 psubdir=guydog pfix=copy
initrd (hd0,2)/guydog/initrd.gz
# Method1 requires you to extract vmlinuz and initrd.lz from the lubuntu live-cd iso and put them in subdir /frugal-lubuntu on hd0,2 (/dev/sda3)
title Frugal Lubuntu with persistence Method1
partnew (hd0,3) 0x0 (hd0,2)/frugal-lubuntu/casper-rw
kernel (hd0,2)/frugal-lubuntu/vmlinuz boot=casper persistent iso-scan/filename=/frugal-lubuntu/lubuntu-13.10-desktop-i386.iso splash --
initrd (hd0,2)/frugal-lubuntu/initrd.lz
# Method2 does not require extraction of vmlinuz and initrd.lz from the iso
title Frugal Lubuntu with persistence Method2
partnew (hd0,3) 0x0 (hd0,2)/frugal-lubuntu/lubuntu-rw
find --set-root /frugal-lubuntu/lubuntu-13.10-desktop-i386.iso
map /frugal-lubuntu/lubuntu-13.10-desktop-i386.iso (0xff) || map --mem /frugal-lubuntu/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-lubuntu/lubuntu-13.10-desktop-i386.iso quiet splash --
initrd /casper/initrd.lz
# The following is just for my own machine, which I'm just including here as a record for my own use.
title Default Win 7 Boot code on HD 0,1 (/dev/sda2) which on the emachines (Acer) netbook I am using boots the win 7 installation on /dev/sda3
rootnoverify (hd0,1)
chainloader +1
boot
######################################################
a. With the above method, you can later rename the casper-rw to, for example, lubuntu-rw, but you must still create it as shown in step 3 above to use the internal volume label (-L) casper-rw. The advantage of using an alternative file name to casper-rw is that you can then use different persistence file names should you be multi-booting from a number of possible live-cd-isos. Putting the persistence file in separate subdirectories, as above, also usefully separates any alternative casper-rw files, without necessarily needing to name them differently. If you do rename casper-rw to lubuntu-rw, the menu.lst Method2 (for example) entry must also be changed to:
Code: Select all
# Method2 does not require extraction of vmlinuz and initrd.lz from the iso
title Frugal Lubuntu with persistence Method2
### the following line changed to refer to lubuntu-rw rather than casper-rw
partnew (hd0,3) 0x0 (hd0,2)/frugal-lubuntu/lubuntu-rw
find --set-root /frugal-lubuntu/lubuntu-13.10-desktop-i386.iso
map /frugal-lubuntu/lubuntu-13.10-desktop-i386.iso (0xff) || map --mem /frugal-lubuntu/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-lubuntu/lubuntu-13.10-desktop-i386.iso quiet splash --
initrd /casper/initrd.lz
c. Had I had a second unused partition table entry, such as that for hd0,1 (which I didn't since that /dev/sda2 ntfs partition was also occupied) I could have used a second instance of partnew to avoid the need in Method2 above for the menu.lst line:
Code: Select all
find --set-root /frugal-lubuntu/lubuntu-13.10-desktop-i386.iso
Code: Select all
partnew (hd0,1) 0x0 (hd0,2)/frugal-lubuntu/lubuntu-13.10-desktop-i386.iso
e. Assuming lubuntu-13.10-desktop-i386.iso has been defragmented (stored contiguously in the ntfs partition):
Code: Select all
map /frugal-lubuntu/lubuntu-13.10-desktop-i386.iso (0xff) || map --mem /frugal-lubuntu/lubuntu-13.10-desktop-i386.iso (0xff)
Code: Select all
map /frugal-lubuntu/lubuntu-13.10-desktop-i386.iso (0xff)