Quad boot Vista, XP, W7 and Ubuntu using HnS to protect system restore points from XP

Terry60

Telephone Sanitizer (2nd Class)
Staff member
Further to my "How to triple boot...." thread, here's a further mod to the HnS menu.lst to add a Linux system into the mix, all controlled through the single HnS boot menu, with both Vista and W7's system restore points protected from corruption by XP.

Subject to the same conditions mentioned in the other thread (this represents my disk/partition layout - yours will be different, and W7 must have installed with its own bootmgr and BCD, not been added to Vista's, and Linux installed with grub in its own boot sector, not the MBR)) here's the menu.lst. (the original unmodified version produced by HnS can be seen in the earlier linked thread for comparison.

# NeoSmart Technologies' Vista Hide 'n Seek Beta
# as modified by Terry 7/2/09 to add W7 and 19/3/09 for Linux

timeout 5
default 0
splashimage=/vhns.xpm.gz
foreground 000000
background ffffff

title Vista 64 bit
find --unhide /Vista.C.HnS
find --unhide /Vista.E.HnS
find --unhide /Vista.I.HnS
find --set-root /BOOTMGR.HNS
makeactive
chainloader /BOOTMGR.HNS
boot

title Windows7 64 bit
find --unhide /Vista.C.HnS
find --unhide /Vista.E.HnS
find --unhide /Vista.I.HnS
find --set-root /Vista.I.HnS
makeactive
chainloader /BOOTMGR
boot

title XP 32 bit
find --hide /Vista.C.HnS
find --hide /Vista.E.HnS
find --hide /Vista.I.HnS
find --remap-root /XP.D.HnS
find --set-root /XP.D.HnS
makeactive
chainloader /ntldr
boot

title Ubuntu 64 bit
find --unhide /Vista.C.HnS
find --unhide /Vista.E.HnS
find --unhide /Vista.I.HnS
root (hd1,4)
chainloader +1


# All your boot are belong to NeoSmart!
 
Last edited:
I've modified this boot technique at the same time as upgrading my HDDs from 500Gb SATA + 160Gb IDE to a pair of 500Gb SATA drives.
I took the opportunity to shuffle the partitions using a cloning app to give more generous size allocations to the OSs from this previous layout as seen in one of the sticky file attachments, to the present layout attached below.

A small boot partition at the start of the 1st drive in the BIOS contains only the Hns bootmgr (a renamed modified grub4dos), the menu.lst file and a grub default file and is marked "active" so that the MBR uses it to control the rest of the boot sequence. (The MBR is Vista's so looks for "bootmgr", hence the deception of renaming grub) The "default" file allows the use of the grub function which dynamically modifies which of the boot menu choices is regarded as default in an unattended boot. This enables Vista, W7, XP or Ubuntu, when running updates or installs to instigate a restart which needs no intervention at the selection menu to return to the current OS.

The menu.lst is now modified to remove the "makeactive" commands, ensuring that the tiny Boot partition remains in control of the whole boot process.

# NeoSmart Technologies' Vista Hide 'n Seek Beta
# as modified by Terry 7/2/09 to add W7 and 17/3/09 for Linux
# Modified 17/4/09 after disk reorg with dedicated boot partition
timeout 5
default (hd0,0)/default
splashimage=/vhns.xpm.gz
foreground 000000
background ffffff
title Vista 64 bit
find --unhide /Vista.C.HnS
find --unhide /Vista.E.HnS
find --unhide /Windows7.I.HnS
find --set-root /Vista.C.HnS
chainloader /BOOTMGR
savedefault
boot
title Windows7 64 bit
find --unhide /Vista.C.HnS
find --unhide /Vista.E.HnS
find --unhide /Windows7.I.HnS
find --set-root /Windows7.I.HnS
chainloader /BOOTMGR
savedefault
boot
title XP 32 bit
find --hide /Vista.C.HnS
find --hide /Vista.E.HnS
find --hide /Windows7.I.HnS
find --remap-root /XP.D.HnS
find --set-root /XP.D.HnS
chainloader /ntldr
savedefault
boot
title Ubuntu 64 bit
find --unhide /Vista.C.HnS
find --unhide /Vista.E.HnS
find --unhide /Windows7.I.HnS
root (hd1,2)
chainloader +1
savedefault
 
# All your boot are belong to NeoSmart!
 
Last edited:
booting Ubuntu 9.04

Hi Terry

Thanks for this. This got my Ubuntu 9.04 up and running. A couple of points though.

First - Using this technique gets Ubuntu up and running. Thank you! However, it means that there is a double menu. You get the HnS menu and then you get the grub menu which you then boot into Ubuntu. The solution that CG gave me a year ago meant that I booted straight into Ubuntu without the second menu. I can't remember excatly how he achieved this or if it is now a difference between the grub from then to now that means that this is not now possible. From memory I only had to copy over the entries from Ubuntu into the HnS menu.lst and it would work.

Secondly, not sure why you are unhiding all the windows entries. One of the features of Ubuntu is that it ignores all the securities within Windows and automatically gives you access to the windows partitions.

Appreciate that you are using the latest build of HnS. Apart from the splash scrren is there any real difference from build 61 to build 56 which is the one I tend to use?

Thanks as always

Gareth
 
Gareth, modify the menu.lst on your linux partition at /boot/grub so its timeout is 0 instead of "timeout 30" or whatever they've set as the default. This should prevent you from getting a second menu when you select Ubuntu from HnS's menu.
 
Justin

Thanks for your advice. I agree with you this will do what you say. But it does not get me back to where I was when CG helped me about a year ago. When I copied the instructions from the Ubuntu 8.04/10 menu into the HnS menu.lst, I did not need to do this. I copied the entries into HnS menu.lst raw from Ubuntu and then it booted into each of them direct. If I change the timout menu then the other menu entries won't work!

Any suggestions welcome!

Thanks

Gareth
 
Since you did that in 8.04 Gareth, grub syntax changed to use UUID, creating problems in HnS and EasyBCD with Neogrub, (that's why there's an Easy2.0 Beta now, but HnS still hasn't been updated) which were both based on an earlier generation of grub4dos. You can chain to the new grub from HnS using the syntax you've now copied, but you can't import that syntax into HnS.
Like Jus said, just timeout 0 in your Linux grub and the 2nd menu goes away, but if you want all the Linux options in the grub menu you're stuck with the 2nd menu as far as I know, but I never use anything other than the standard boot so timeout 0 does it for me.
I can't remember now what builds 57-59 added, but unless you want the splash screen, "if it ain't broken....."
The unhides are in there because the hide bit isn't a Windows thing, it's a physical switch in the partition table. If I were to go from XP to Ubuntu directly, the Vista and W7 drives would still be flagged as hidden.
 
If you need access to the other entries than just the default for some reason (you shouldnt for the most part) press ESC as you select Ubuntu entry from HnS menu.
 
Thanks Jus and Terry. Now understand the problem with HnS and Ubuntu. Still, it is the best way I have yet found to triple boot and preserve all the recovery points. For a method similar to the way that it worked with Ubuntu 8.04/10, will have to wait for CG to do an update to HnS I guess.
 
Hi Terry

Regarding the need to use unhide with Ubuntu. Is their something different about you boot arrangements? I have found that I don't need to do the unhide arrangement.

Gareth
 
It's just a neatness thing Gareth. I hide Longhorn systems when XP is booted and unhide them when it isn't.
I have no idea whether Linux would find a hidden drive or not, but I don't want it hidden from linux anyway, only from XP, hence the unhides.
They're all redundant anyway when rebooting any Longhorn or switching between Longhorns or Linux, but I put them there because you never know when the previous system booted might have been XP.
 
Thanks Terry - Thought I was missing a trick with some special boot arrngement you had. Ubuntu will ignore any securtiy instructions that are setup for XP/Vista and I assume RC7. So you don't need to set up the unhide feature when you boot Ubuntu.

A couple of questions if I may?

1. Can I install RC7 to an external harddrive and still use HnS?
2. If I do that and the external drive is not there will it cause any problems with the Hns boot with a hide/unhide partition not being there?

Gareth
 
You can install W7 to an external drive, but only in .vhd container. I'm not sure how'd you go about setting up menu.lst correctly (if even possible) to boot from such a file, and since EasyBCD doesn't support it for the time being you're better off sticking with a physical system on one of your main internal drives or running a vm.

In regard to your second question, grub tends to go line by line with entries. If for some reason the externals not present and you have a hide/unhide command there, it would probably give you an error and stop there without continuing to boot the OS for the entry you selected.
 
"vhd" stands for "virtual hard drive", which basically is a file with the extension ".vhd" that you can install an OS to. I did that myself actually, and that is what I installed Win 7 to, because I didn't feel like creating another partition (already have plenty on my disk). And it works perfectly ok. :smile:
 
Here's how to create it. You need to be using the version of diskpart I believe that shipped with W7. For the first part of the guide where hes doing it in Windows you can do it just as easily from the Windows 7 DVD as well without already having W7 installed if you'd rather not have it installed to its own physical partition as Cool mentioned.
 
I'm quite happy to have it in its own partition, but it needs to be on one of my external drives as I have run out of partitions on my internal hard drive. Why would I want it to be on a .vhd as opposed to a partition on my external hd?
 
Cause the Windows 7 bootloader supports booting from .vhd containers which can be stored anywhere while Windows otherwise doesn't allow for physical installations other than on internal/internal interfaced media.
 
Hi

Installed Vista SP2 last night and lost the ability to boot from HnS. I have tried to re-install HnS. It says it is uninstalled but when I go to reinstall, it doesn't put the appropriate files in the Vista drive (or anywhere else that I can see) and I get the following debug message:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.IO.IOException: The process cannot access the file 'C:\Users\Gareth\Desktop\Vista HnS Beta Build 56\Vista HnS.log' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.StreamWriter.CreateFile(String path, Boolean append)
at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize)
at System.IO.StreamWriter..ctor(String path, Boolean append)
at Vista_HnS.Logger..ctor(String path, LogLevel logLevel)
at Vista_HnS.HnS..ctor(Configuration configFile)
at UI.Working.Start(ControlCollection cCollection)
at UI.Install.btnNext_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
UI
Assembly Version: 0.5.0.47
Win32 Version: 0.5.0.47
CodeBase: file:///C:/Users/Gareth/Desktop/Vista HnS Beta Build 56/UI.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
CodeBase: file:///C:/Windows/assembly/GAC_MSI....0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Vista HnS
Assembly Version: 0.5.0.47
Win32 Version: 0.5.0.47
CodeBase: file:///C:/Users/Gareth/Desktop/Vista HnS Beta Build 56/Vista HnS.DLL
----------------------------------------
System.Management
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
CodeBase: file:///C:/Windows/assembly/GAC_MSI...0.0.0__b03f5f7f11d50a3a/System.Management.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

If I remember rightly, there was a tip to remove certain files and then start over again, but can't remember which ones excatly. Is it just BOOTMGR.HNS?

The other .hns files are not present

bootmgr is still there and if I remove the above file will bootmgr still work if I can't get HnS to work?

Thanks for your help

Gareth
 
bootmgr.hns is the Vista bootmgr, renamed.
HnS renamed Grub4Dos (grldr) as bootmgr in order to take control by pretending to be the MS bootmgr.
SP1 (and now SP2 it seems) put in a new bootmgr, but of course they didn't replace the real one but the fake, destroying HnS.
If you delete all of the .hns files (including that old pre SP2 renamed bootmgr, which will prevent the UI from renaming the new one), you should be able to reinstall.

(I'm so glad I put my HnS bootmgr in its own partition and left W7 and Vista versions un-renamed. SP2 went on without touching my quad-boot at all)
 
Last edited:
Thanks Terry. The files I can see that I beleive that I need to get rid of are as follows:

bootmgr
BOOTMGR.HNS
BOOTSECT.BAK

Grateful if you would confirm?

Gareth
 
Back
Top