Multi-booting from HDD with only grub4dos on USB.

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

Multi-booting from HDD with only grub4dos on USB.

#1 Post by gyro »

What's the wrinkle?
While the machine boots off a USB device, no Operating Systems are stored on the USB device.
All the Operating Sysems are stored on the internal HDD. Only grub4dos is installed on the USB device.

A significant advantage when we start with a Windows machine is that the Windows booting is never disturbed in any way.
And no part of this process needs to know how Windows boots.

The USB device is not required by any Operating System, so the port is available to be used by other devices if needed.
The USB device is not reformated, (use stock standard vfat).
Requires approximately 300KB on the USB device. So, old small devices will do.


Method:
1) Setup HDD with all Operating Systems in place.
2) Run Puppy Linux.
3) Insert USB device.
4) Install grub4dos on MBR of the USB device, using "Grub4Dos bootloader config".
5) Configure machine to boot from USB HDD as first priority.

Required:
That the machine can be configured to boot from a USB storage device, and you need to be able to do this.

Example:
A laptop with Windows 7 installed on the whole of the HDD. In this case this actually uses 3 partions, but it doesen't matter.
This is going to be dual booted with a frugal install of Puppy Linux, (I used "Dpup Expimo 5.X.3.4.12"), on the main NTFS partition.

In Windows:
1) Download a Puppy linux ISO file.
2) Burn it to a CD.
3) Create a directory called "puppy", (or whatever), on "C:\".
4) Re-insert the CD and copy "vmlinuz", "initrd.gz", and all ".sfs" files to "C:\puppy".
5) Re-boot the machine off the CD.
In Puppy Linux:
1) Insert your USB storage device, (I used an old 1GB SD card).
2) Run "Grub4Dos bootloader config" from the "System" menu.
3) Select your USB device to install bootup loader, (Mine was "sdb" "1019MB Multi Flash Reader").
4) Just click "OK" until it is finished.
(It may gve a warning that the "boot" flag is not set. My machine booted from the USB device anyway. But it may be necessary to use Gparted to set the "boot" flag on the partitiion.)
5) Unmount the USB device, (but leave it in the machine).
6) Re-boot then machine into the bios setup.
In Bios:
1) Configure the boot priority sequence so that USB HDD comes before the internal HDD.
(This means that if there is a bootable USB storage device, the machine will boot off that. If there is no bootable USB storage device, it will boot off the internal HDD.)
2) Save and exit Setup.
The machine should re-boot off the USB storage device and show a Grub4Dos boot menu.
If it does not, re-boot the machine off the CD, and use "GParted partition manager" from the "System" menu to set the "boot" flag on the USB partition, then re-boot.

At this point we have a dual booting machine.
To boot Puppy Linux, boot the machine with the USB device inserted.
To boot Windows, boot the machine without the USB device.


But, there is more.

The Grub4Dos menu, as defined in the "menu.lst" file on your USB device, may contain a "Windows" item.
(Mine did not, "Grub4Dos config" seemed unable to sortout the 3 partitions.)
Either way, it is possible to reliably boot Windows from Grub4Dos.
This requires editing the "menu.lst" file.
In Puppy Linux:
1) Mount the USB device.
2) Open "menu.lst".
3) If there is an existing "Windows" item, remove it.
4) Open "menu-advanced.lst"
5) Copy the "Bootup from HDD" item from "menu-advanced.lst" and paste it into "menu.lst" as a "Windows" item.
6) Save and close "menu.lst". Close "menu-advanced.lst"
7) Un-mount the USB device.

Now the USB device can be left inserted, and either Puppy Linux or Windows can be booted from the Grub4Dos menu.
(Of course if you are doing a lot of work on Windows, that might require a number of re-boots, it can be convenient to remove the USB device.)


Of course there can be more.

The setup on the internal HDD can be a lot more complex, with more installations.
The most obvious, is to add more frugal Puppy Linux installs, each in their own directory.
If you are into disk re-partitioning, then the Puppy Linux installs could be stored in a sizeable Linux partition. This has the added advantage that large applications can be stored in "/mnt/home".
(I did this on a Windows XP box, when I replaced the HDD.)
And of course there could be many more partitions with many more installs, provided Grub4Dos can boot them.


NOTE: Creating savefiles on NTFS partitions:
When Puppy Linux comes to create a savefile for a frugal install that resides on an NTFS partition, it gives a rather concerning warning message.
To avoid whatever problems this is supposed to cause; Create the savefile on the USB device. Re-boot into windows. Move the savefile into it's appropriate directory. Re-boot back to Puppy Linux.
An added side effect of this process is that resultant savefile on NTFS will usually be contiguous.


gyro
Last edited by gyro on Sat 19 Oct 2013, 12:54, edited 1 time in total.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#2 Post by musher0 »

Hello, gyro.

Thanks for this tutorial.

Best regards.

musher0
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#3 Post by gyro »

musher0,

You're welcome.
Just sharing something that I find quite useful.

gyro

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#4 Post by nooby »

gyro don't get me wrong now.

I love that you have described it in such detail.

I am too dense. What is the main practical positive thing about it?
That you can add puppy linux and other frugal installs
and never have to change any boot up boot.ini on that computer?


That sure is a good thing. I had to fight real hard for weeks
to find out how to boot on this Win Vista machine needing
a program from a commercial site that allowed such booting.

So your set up would have made that easier then.

But on the two Net tops with win 7 and win xp these had not
that problem unless me fail to remember.

I used grub4dosconfig instead on them.

Using your approach that would not be needed then.
Your way leave the computer as it is apart from the files
that you add and they are like any added files. nonintrusive
while grub4dosconfig make a backup of the mbr and create a new one?

Have I understood what is different now?
I use Google Search on Puppy Forum
not an ideal solution though

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#5 Post by gyro »

nooby,

I think you have pretty much got it.
The main point is that the windows installation and booting are not disturbed. If the USB device is removed then it looks like a straight windows box, (with a few extra odd files.)

gyro

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#6 Post by nooby »

Gyro that certainty is a good thing.
People don't like changes they have no idea
what them are about. And doing frugal this way
only needs the three files from the iso
and these are easy to take away if one want to restore it completely.

what I may worry about may be the Firefox in Ms windows
and the Firefox in Puppy both wanting to have a .mozilla directory?

But I know too little. Did you notice any such complication?

thanks for sharing this method and the good description.
I use Google Search on Puppy Forum
not an ideal solution though

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#7 Post by gyro »

nooby wrote:what I may worry about may be the Firefox in Ms windows and the Firefox in Puppy both wanting to have a .mozilla directory?
Firefox in Ms windows does not use a .mozilla directory. It stores it's data in a completely different path.
Even for multiple frugal Puppy installs, by default, the .mozilla directory is stored in the savefile, and so is unique to each install.
Like any multi-boot setup, by default, the applications in the various OS's do not interfere with each other.
gyro

User avatar
Makoto
Posts: 1665
Joined: Fri 04 Sep 2009, 01:30
Location: Out wandering... maybe.

#8 Post by Makoto »

nooby: Just in case you're wondering, here's a Mozillazine article that lists the locations where the profile folder is stored across the different versions of Windows, plus Linux and OS X:

http://kb.mozillazine.org/Profile_folder_-_Firefox

(It technically hasn't been updated to specifically mention Windows 8, but Firefox will still store its profile folder in the same place as Vista, 7, etc.)
[ Puppy 4.3.1 JP, Frugal install ] * [ XenialPup 7.5, Frugal install ] * [XenialPup 64 7.5, Frugal install] * [ 4GB RAM | 512MB swap ]
In memory of our beloved American Eskimo puppy (1995-2010) and black Lab puppy (1997-2011).

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#9 Post by nooby »

Thanks Makoto, could be good to know.

Sad that so few test out what Gyro came up with.
Seems to be a cool thing indeed.
I use Google Search on Puppy Forum
not an ideal solution though

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

shrink ntfs with win7/8

#10 Post by gyro »

If you want to go beyond storing frugal installs on the ntfs C: drive, you need some unallocated space on your hard drive.
In "Disk Management", windows 7 and windows 8 have a facility to "shrink" an ntfs partition, (Vista may have it, I don't know. I know xp did not.)
So, If your C: drive is the last partition on your hard drive, go to "Disk Management", click on the C: drive partition, then click on "Partition" -> "Actions" -> "Shrink".
I did this on a windows 7 machine, and ended up with over 300GB of space at the end of a 700GB disk.
I then booted into Puppy linux, formated the space as an ext4 partition, and copied my Puppy frugal install directories from the ntfs partition onto the ext4 one.
Then run grub4dos config onto the USB device again.
Boot into Windows and remove the Puppy directories on the C: drive.
Boot into a Puppy on the ext4 partition, and run grub4dos config onto the USB device again.

gyro

Post Reply