Jump to content











Photo

Dual Boot Problem with Grub4Dos


  • Please log in to reply
15 replies to this topic

#1 ispy

ispy

    Silver Member

  • Tutorial Writer
  • 592 posts
  • Location:PILGRIM

Posted 05 January 2016 - 10:11 PM

Can anyone help with a problem I have with dual booting XP & Slax (A minimal slackware distro)

 

I have visited the Grub4Dos site downloaded the Grub4Dos file to the root of C:\ used the syntax C:\GRLDR="GRUB" in the XP boot.ini file & no luck when booting (I do Not want to install grub to the MBR by the way). When I boot I get a menu that has Windows XP & Grub listed, & the windows XP option still works thankfully but when selected but the Grub option spits out the following error message. I have installed a windows driver called Ext2IFS which allows XP to read/write to the Slax Partition & I have copied the Boot Folder & Slax folder off the distro CD to the EXT3 partiiton ready.
---------------------------------------------------------------------------------------------------------------------
Windows could not start because the following file is missing or corrupt
<Windows root> \system32\Hal.dll
Please re-install a copy of the above file? (However as said XP is still operable if that option is selected)
---------------------------------------------------------------------------------------------------------------------
I have now managed to setup my 2no hard drives in the following manner on a 2gig Ram Medion PC
Hard drive one (Serial-ATA 150gig)

1. Left a 3 gig un-allocated space on the front end of 1st Hard Drive before partition one) I have left this As I was thinking of situating the boot loader within this to separate from the XP & Slax partitions once I know for sure which boot loader I'm going to use if grub4dos proves a NO Go!

 

Hard Drive one (Serial ATA)
2. Partition 1 Hdd(1) = 87.6 gig formatted to NTFS containing XP Home
3. Partition 2 Hdd(1) = 58.4 gig formatted to Ext3 to hopefully accommodate Slax

Hard Drive two (Serial ATA)
4. Partition 1 Hdd(2) = 8 gig Fat32 partition called Swap for both XP & Slax
5. Partition 2 Hdd(2) = 225 gig partition called Store NTFS which holds portable programs general misc files etc.
The reason I have selected Slax (Minimal setup) is it is per-configured with Virtual Box as I would like try out other Linux OS systems
Is there another boot loader than I can use that is easier than Grub that does not require loading into the MBR?
Best regards,
eyespy



#2 Zoso

Zoso

    Silver Member

  • Advanced user
  • 605 posts
  •  
    Isle of Man

Posted 05 January 2016 - 11:28 PM

hi ispy,

both grldr and menu.lst need to be present in C:/ and the menu.lst need to be edited (notepad works for this) to add entry for slax but I cant help you with that and im not sure it can work that way. I know it (grub4dos) will boot slax or other distros directly from an ,iso file on an NTFS or fat32 partition but not about from extfs.

hopefully someone will chime in about that but since you didnt mention the menu.lst, I thought maybe that might causing your problem.

#3 ispy

ispy

    Silver Member

  • Tutorial Writer
  • 592 posts
  • Location:PILGRIM

Posted 06 January 2016 - 09:03 AM

Hi Zoso pleased to make your acquaintance,

 

You are correct in mentioning the Menu.1st file I will need to do some research on the correct syntax for this file I was concerned about NOT messing with the MBR & will need to adjust its location, one step nearer my goal thanks!

 

Best Regards,

 

eyespy



#4 steve6375

steve6375

    Platinum Member

  • Developer
  • 6462 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 06 January 2016 - 12:28 PM

http://diddy.boot-la...all_windows.htm

Use a recent version of grub4dos http://grub4dos.chen...ries/downloads/- e.g. 0.4.6a 18-11-2015



#5 ispy

ispy

    Silver Member

  • Tutorial Writer
  • 592 posts
  • Location:PILGRIM

Posted 07 January 2016 - 10:27 AM

Hi Steve6375,

 

Thanks for the links, I have downloaded Version 0.4.6a as you have suggested, I have put The Menu.1st, the Grldr and the Edited boot.ini into the root of C:\ The amended boot.ini has the C:\GRLDR="Start GRUB" entry added & menu.1st reads:

--------------------------------------------------------------

color yellow/blue white/blue

root (hd0,1)

########################################

title Slax Graphics Mode (6.1.2)
kernel /boot/vmlinuz ramdisk_size=6666 root=/dev/ram0 rw autoexec=xconf;telinit~4 changes=/slax/
initrd /boot/initrd.gz
boot

----------------------------------------------------------------

The menu 1st seems to be the tricky part as it doesn't seem to being recognized by grub. The XP option loads okay but with the drive/partition  being installed on a serialATA drive not sure if toot (hd0,1) should be root Sda1 instead? At the grub boot screen I get

----------------------------------------------------------------

Booting 'find /menu.1st, /boot/grub/menu.1st, /grub/menu.1st

Grub4dos 0.4.6a 2015-12-31, Mem:638k/1981m/OM, End:363692

{Minimal Bash-like......

Grub> _(Flashing curser)

---------------------------------------------------------------

Once I have depressed the Esc key, but grub seems to load & now XP is functional but loading slax is still problematic its highly likely My menu.1st entry could be wrong, Any ideas?

 

Best Regards,

 

eyespy



#6 steve6375

steve6375

    Platinum Member

  • Developer
  • 6462 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 07 January 2016 - 10:30 AM

MENU.LST  not MENU.1ST



#7 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13333 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 07 January 2016 - 11:21 AM

Sure, but it's Ok, the menu.lst is loaded it is just Misty mis-reading the small l for a 1.

@Misty
It is lst as short for List, not 1st as short for First.

Try using this:  
color yellow/blue white/blue

timeout 30


title Slax Graphics Mode (6.1.2)
find --set-root /boot/vmlinuz
root
pause
kernel /boot/vmlinuz ramdisk_size=6666 root=/dev/ram0 rw autoexec=xconf;telinit~4 changes=/slax/
initrd /boot/initrd.gz

title Go back to NTLDR
find --set-root /ntldr
chainloader /ntldr
 
 
:duff:
Wonko

#8 ispy

ispy

    Silver Member

  • Tutorial Writer
  • 592 posts
  • Location:PILGRIM

Posted 07 January 2016 - 03:20 PM

Hi Steve6375 & Wonko the Sane,

 

Yep! Stands corrected not really got to grips with Grub or Linux for that Matter but even a small thing like a dot or a comma missing or being a dumass & mis-reading sumfin can screw things up (it's either right or NOT, far cop guv). apologies conveyed Wonko/Steve I have tried your amended script for Menu.something & it WORKS it now loads Slax to partition 2 Ext3 Filesystem as follows, Much obliged:

------------------------------------------Start-------------------------------------------------

Booting 'Slax Graphics Mode (6.1.2)'

(hd0,1) (This was surprising to me as the drive partition is on a serialATA type drive would have thought it should have been Sda1 but Hey Ho)

(hd0,1) Filesystem type is ext2fs, partition type 0x83

_ (flashing curser)

------------------------------------------end--------------------------------------------------

I then proceeded to hit the enter key as I noticed within your script Wonko you have inserted "Pause" but I think this was inserted to phase the installation for errors as the loading proceeded. Is it okay Wonko to remove the "Pause" part of the script to permit a seamless installation?

All this without affecting the Mbr Kewl (Nice Menu screen by the way Wonko!)

 

Thanks everyone for their contributions every little bit helps to clear my Fog.

 

I now have Slax (minimal) CD installed on partition 2 of Hdd 1 pre-loaded  with Virtual box V4.1.2 R 73507 Time to test run it.

 

"grazie"

 

eyespy



#9 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13333 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 07 January 2016 - 04:44 PM

Yep :), the idea is that the "find --set-root" command will find the file "/boot/vmlinuz" (actually first occurrence it can find) and then establish root to that volume and then the "root" command is used to display which volume is that (and the "pause" is of course only to make sure that displayed info is noticed.

Now that you have certainty that the volume is (hd0,1) and that the rest of the entry works, you can replace the whole entry with:

title Slax Graphics Mode (6.1.2)
root (hd0,1)
kernel /boot/vmlinuz ramdisk_size=6666 root=/dev/ram0 rw autoexec=xconf;telinit~4 changes=/slax/
initrd /boot/initrd.gz

As a side note different Linux distro's may enumerate disk devices as either hd or sd, all use use letters, i.e. first disk is hda/sda, second disk is hdb/sdb, etc. BUT partitions/volumes are numbered starting from 1, i.e. sda1 means first volume on first disk.

 

In grub4dos (as well as in original GRUB, i.e. what is now stupidly called GRUB legacy) disks are enumerated starting from 0, i.e. (hd0) is first disk, (hd1) is second disk, etc. AND as well partitions are enumerated starting from 0, i.e. (hd0,0) means first partition on first disk and (hd0,1) means second partition on first disk.

 

GRUB2 (the thing that is stupidly called GRUB nowadays) numbers partitions like Linux, introducing the complication of the "msdos" qualifier (which is BTW not only stupid, but also "wrong").

 

So the volume you have the Slax would be referred to as:

sda2 <- Linux

(hd0,1) <- grub4dos and GRUB

(hd0,msdos2) <- GRUB2

 

:duff:

Wonko



#10 ispy

ispy

    Silver Member

  • Tutorial Writer
  • 592 posts
  • Location:PILGRIM

Posted 07 January 2016 - 05:42 PM

Hi Wonko,

 

Many thanks for your help and explanation of the various conventions in respect of Linux grub4dos & Grub2. Understandable why people could get confused when dealing with these matters, however its not hard to confuse me, senior moments occur more frequently as I am getting older LOL. Also within the menu I might add later: (But I will keep things simple for now)

---------------------------------start-----------------------------------

title Slax Graphics Mode (6.1.2)
root (hd0,1)
kernel /boot/vmlinuz ramdisk_size=6666 root=/dev/ram0 rw autoexec=xconf;telinit~4 changes=/slax/
initrd /boot/initrd.gz

 

title Slax 6.1.2 Shell
kernel /boot/vmlinuz ramdisk_size=6666 root=/dev/ram0 rw
initrd /boot/initrd.gz
--------------------------------end-------------------------------------

 

On a side note  - The other thing I will need to do within Slax (which is now read & write capable) is setup the Swap file on the front end of Hdd 2 (SerialATA). Maybe a small 4-5 gig Ext3 or Fat32 filesystem, however Fat32 does not like files larger than 4 gig & Slax does not like Ex-fat which does not seem to be catered for in Slax as yet. I have also installed a Ntfs-3g open-source module driver in Slax so that along with the Ext2IFS driver situated in XP I can read/write files both ways from/to Slax & vice/versa, not that it is recommended according to the Slax Forum.

 

Anyway without you this would not have been possible so many thanks to You and Steve for your contributions & clearing up confusions that I & others may have. Maybe one day the Slax team will write an auto installer so that allow users to install to a hard drive setup rather than just to CD or USB

 

Cheers! :good:



#11 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13333 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 07 January 2016 - 07:07 PM

Well, of course it depends on how much memory your machine has and the intended use of the Slax, but most probably you don' t even *need* a swap "area" at all, and I doubt anyway bigger than 4 Gb.

Normally on Linuxes a dedicated partition is dedicated (when needed) to swap, Slax has an added feature to have swap inside a file but it is just a "convenience" to allow to not need to create a dedicated partition, if you use a swapfile (mkswap+swapon) in Slax and have ntfs-3g enabled AFAIK you can use a file on a NTFS volume alright. :unsure:

The whole idea of Slax is however that of being the least "intrusive" on a system, or if you prefer the "intended scope" is about a "live" OS only, for a "permanent install" there is Slackware.

 

:duff:

Wonko



#12 ispy

ispy

    Silver Member

  • Tutorial Writer
  • 592 posts
  • Location:PILGRIM

Posted 08 January 2016 - 09:58 PM

Hi Wonko,

 

I hear where you are coming from, I did look at slackware as Slax (Circa 290mb) is a mini version of slackware allegedly. But I was looking for a small suitable small footprint candidate to run Virtual box to try out other Linux OS's as the day is coming when XP will go beyond legacy & be resigned to the grave yard Boo Hoo! Updates for XP only come with the POSready fix until 2019 at the latest. Under consideration was also Slitaz (50Mb) but could not find a module or a build mechanism to attach to Slitaz to run Virtual Box, why virtual box well its the VM I am most familiar with I tend to go with what I know & I am not sure whether Slitaz will be able to run Virtual Box effectively, anyway it is kinda small but I possibly may be under estimating it?

The ram installed on my Medion PC is 2Gig maxed out I have Eboostr running to max the physical ram & manage the Swap file. I have the option to add 2 further speedy flash disks to improve things VERY slightly but the mileage is probably not worth a mention really.

 

To be able to run other Linux Distribs in Virtual box will take valuable resources so I was trying to minimize the resources of the host OS improve the chances of running other flavours of Linux etc, well that's the rationale.

Not sure if the information listed below is absolutely correct but went on the slax forums and found this posting re Slax Swap File. Maybe of use to someone else looking in or interested. Quote source Slax forums......

-------------------------------start--------------------------------------

the swap partition can also be done from native slax

first user can use fdisk -l to show all partitions.
then use cfdisk /dev/sda or cfdisk /dev/hda
use the keyboard and select type 82 linux-swap
mkswap /dev/locationofswap /mnt/correspondinglocationondisk
reboot or use
swapon /dev/locationofswap

swap partition should be available. It should be set optimally to twice the amount of ram in the system. ie, if you have 512 MB Ram, you may make a swap of 1024MB. This is optimally but not required.

But as fred_m said using GParted module or Gparted-Live CD, it is much easier and quicker for creation purposes

-----------------------------------end---------------------------------------

As you have mentioned, the Slax .iso was compiled with the NTFS-3g driver to utilize the NTFS swap file currently used by XP.

 

Again Many thanks for your kind help and understanding in respect of my endeavors you are a credit to the forums of Reboot.pro If there was a greens thumbs up credit you would get my vote.

 

All the best

 

eyespy



#13 pollo

pollo
  • Members
  • 6 posts
  •  
    Belgium

Posted 07 July 2016 - 05:12 PM

Sure, but it's Ok, the menu.lst is loaded it is just Misty mis-reading the small l for a 1.

@Misty
It is lst as short for List, not 1st as short for First.

Try using this:  

color yellow/blue white/blue

timeout 30


title Slax Graphics Mode (6.1.2)
find --set-root /boot/vmlinuz
root
pause
kernel /boot/vmlinuz ramdisk_size=6666 root=/dev/ram0 rw autoexec=xconf;telinit~4 changes=/slax/
initrd /boot/initrd.gz

title Go back to NTLDR
find --set-root /ntldr
chainloader /ntldr
 
 
:duff:
Wonko

 

Hi wonko,

I tried to boot my usb disk using these two codes but didnt succed, here are the 2 codes and errors , have you any idea why my slax 612 didnt launch correctly

the 1st code:

title Slax 6.1.2 Graphics mode (KDE)
find --set-root /MyFlash/Module/Slax612/boot/initrd.gz
kernel /MyFlash/Module/Slax612/boot/vmlinuz initrd=/MyFlash/Module/Slax612/boot/initrd.gz ramdisk_size=6666 root=/dev/ram0 rw autoexec=xconf;telinit~4 changes=/MyFlash/Module/Slax612/
initrd /Slax612/boot/initrd.gz

 

image error below
http://imgbox.com/KB5Sqj80

and the second code:

title Slax 6.1.2 Graphics mode (KDE)
find --set-root /MyFlash/Module/Slax612/boot/initrd.gz
kernel /MyFlash/Module/Slax612/boot/vmlinuz initrd=/MyFlash/Module/Slax612/boot/initrd.gz ramdisk_size=6666 root=/dev/ram0 rw autoexec=xconf;telinit~4 changes=/MyFlash/Module/Slax612/
initrd /MyFlash/Module/Slax612/boot/initrd.gz

 

image error below too
http://imgbox.com/Fbb8YXEh
 

thank you for your help


Edited by pollo, 07 July 2016 - 05:13 PM.


#14 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13333 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 07 July 2016 - 07:42 PM

Beside the fact that you should be ALWAYS using command line and NEVER a pre-made menu.lst when experimenting, the first is clearly an issue in the path of the initrd, the red part is missing:

initrd /MyFlash/Module/Slax612/boot/initrd.gz

the second is instead a Slax error, somehow some "cheat codes", i.e. the:

"initrd=/MyFlash/Module/Slax612/boot/initrd.gz ramdisk_size=6666 root=/dev/ram0 rw autoexec=xconf;telinit~4 changes=/MyFlash/Module/Slax612/"

is incorrect. (the red part above is not needed, why - the heck - did you add it?) But there may be other issues besides that.

 

Maybe the path is incorrect or the path is case sensitive, etc. double check 

Try (for simplicity) with /boot and /slax/ like in the example, and only once that works move files and change paths.

 

:duff:

Wonko



#15 pollo

pollo
  • Members
  • 6 posts
  •  
    Belgium

Posted 08 July 2016 - 09:07 AM

thank you for reply, I searched this forum and found the solution.

the first I wanted to boot my puppy linux by using the ISO file but without success I used this code as I read some where in this forum, I extracted all the iso in puppy directory and placed it in root of my flashdisk and its worked fine, but if you try to copy the same content in lets say : dir01/dir02/.... its wont works, I created only one directory /puppy/ for my case as given some where in forum ( didnt remember the link ).

title Puppy-slacko-5.6
find --set-root /puppy/vmlinuz
kernel /puppy/vmlinuz root=/dev/ram0 pmedia=
initrd /puppy/initrd.gz

and the second code for booting slax v6.1.2, its worked fine too by using the ISO file directly copied in my directory /Myflash/Modules/, well I could copy the ISO to the root but I wanted some organization in my flashdisk.


title Slax 6.1.2 Graphics mode (KDE)
map /Myflash/Module/slax-6.1.2.iso (0xff) || map --mem /Myflash/Module/slax-6.1.2.iso (0xff)
map --hook
root (0xff)
kernel /boot/vmlinuz from=/Myflash/Module/slax-6.1.2.iso ramdisk_size=6666 root=/dev/ram0 rw
initrd /boot/initrd.gz

thank you again wonko and all members for your many ideas.



#16 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13333 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 08 July 2016 - 10:28 AM

Yep :), for the slax .iso it is the "from=" that allows the magic to happen, it is a common problem, the good Linux guys have a knack for not documenting "cheat codes" (kernel parameters) or putting it in places where noone is able to find them, and to make things easier they continuously change them, one way or the other, I often wonder if they do it in good faith or on purpose to make things more difficult :frusty:.

The Puppy (maybe) would work with the "iso-scan/filename=" cheatcode, see:
http://reboot.pro/to...-boot-from-pxe/

 

If it is possible in your setup, the partnew (fake iso partition) approach usually works (be VERY CAREFUL, make sure (and DOUBLE sure) you have FULLY understood the approach before writing to the MBR:
http://reboot.pro/to...brided/?p=88531

 

:duff:

Wonko

 

 






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users