How to switch from Grub4Dos to Grub2?

Booting, installing, newbie
Post Reply
Message
Author
TorontoBoy
Posts: 6
Joined: Sat 18 Mar 2017, 19:52

How to switch from Grub4Dos to Grub2?

#1 Post by TorontoBoy »

I have a Win ME install on an old desktop. Booting to Tahrpup 6.0.5 I used Gparted to partition the disk to:
sd1: Windows ME Fat32
sd2: /dos, for personal data, ntfs
sd4: linux swap
sd3:
sd5: /home ext4
sd6: /linux2 ext4
sd7: linux 1, ext4, where I installed Puppy full

I installed Tahurpup Full into sd7, which was easy. Grub4Dos came up and I let it run. When I boot Grub4Dos loads properly and I can switch between Tahrpup and Win ME.

I wanted to try Debian in sd6, but when I install it Debian sees none of the partitions, only the completed sda disk. I also tried Ubuntu and it also does not see my partitions, Win XP, nor Tahrpup.

I tried the Ubuntu boot repair but it did not work.

How can I switch from Grub4Dos to Grub2 so that I can also load either Debian or Ubuntu into sd6?

Thanks in Advance.

Bird Dog
Posts: 71
Joined: Sun 15 Jun 2014, 18:06
Location: Toronto, Ontario, Canada

Grub4Dos

#2 Post by Bird Dog »

Hi TorontoBoy if you can't figure out how to switch to Grub2 maybe try installing Debian or Ubuntu first then install puppy after.

Thanks
Bird Dog
Frugal Xenialpup 64, Bionicpup 64 save folder on core2 quad Q6600 2 gigs ram, AMD 6 core 4 gigs ram. Frugal Xenialpup 32, Bionicpup 32 save folder on P4 3.0 ghz 1 gig ram, Dell P4 Celeron 2.4 ghz 1 gig ram

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

Don't Switch

#3 Post by mikeslr »

Hi TorontoBoy,

+ 1 for Bird Dog.

Both debian and Ubuntu use Grub2 which doesn't recognize frugal installs as operating systems. Based on your experience, it appear that it doesn't recognize Window ME either.

I'm sure Grub2 must have some advantages otherwise why would the Big Devs have chosen to use it. Or was it just a case of the Emperor's New Clothes? But aside from its failure to recognize operating systems, it is also more difficult to customize, to add boot-splashes, to do almost everything which you can easily do with Grub4dos.

Yes, you can customize grub2 to recognize Puppies. But I can't find my notes on how to. You can search an Ubuntu/debian Forum for instructions, or ask there. I think nooby's post here is still valid: http://www.murga-linux.com/puppy/viewto ... 969#407969. The only thing I can add to that is if you used boot-arguments in Grub4Dos, they'll also probably work under Grub2. And note that the line which Grub4dos starts with the term kernel, grub2 starts with linux.

But the simplest solution is just to boot into any Puppy --from a CD/DVD if you have to-- run Menu>System>Grub4Dos bootloader config, select sd1 as the location for it to be installed. It will search your entire computer --including any plugged in USB-Keys-- and generate a Menu.lst having listings for Puppies, Windows, debian, ubuntu, what-have-you: every operating system present [with, as far as I know, excepting only DebianDogs, and Manjaro maybe Tinycore]. You'll have an opportunity to edit menu.lst before it's written to the hard-drive.

mikesLr

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#4 Post by rufwoof »

I have Debian as a full install, and also have a /live/filesystem.squashfs image of that full install ... created using something like

cd live
mksquashfs / filesystem.squashfs -e live

that I can boot frugally. For the full install however I also installed Debian Grub which created a /boot/menu.lst ... that I chain to from grub4dos using a menu.lst entry of :

title Debian FULL
find --set-root /live/jessieamd64lxde
configfile /boot/grub/menu-mine.lst
commandline

That /live/jessieamd64lxde is just a file I created for grub4dos to find

I've actually made a copy of the debian menu.lst (/boot/grub/menu.lst), calling in menu-mine.lst as sometimes debian updates decide to change the UUID and having it fixed like that keeps it more reliable. That /boot/grub/menu.lst key lines look like

title Debian GNU/Linux, kernel 3.16.0-4-amd64
root (hd0,0)
kernel /boot/vmlinuz-3.16.0-4-amd64 root=UUID=541b5ffd-b37d-4f2c-aa5a-3430c3131cd1 ro quiet splash
initrd /boot/initrd.img-3.16.0-4-amd64

... which is basically what Debian set it to when installed.

Another example grub4dos syntax is my freebsd boot, that looks like

title BSD
root (hd0,2)
chainloader +1
boot

(hd0,2) just signifies that freebsd's ufs2 filesystem is on sda3 ... and grub4dos just chains to its bootloader.

IIRC when installing Debian I opted to install the bootloader to the partition rather than the mbr (which would obviously otherwise have overwritten grub4dos). I think I also opted for the 'legacy' choice.

TorontoBoy
Posts: 6
Joined: Sat 18 Mar 2017, 19:52

#5 Post by TorontoBoy »

Puppy runs so well on my ageing p3 800, 500mb 15yo desktop, I've decided to leave it be, accompanying Win ME. The Ubuntu boot rescue did not damage Puppy or the MBR, so all is well.

I'll just leave Puppy separate from Debian/Ubuntu installs. It seems better this way. Puppy is still the fastest OS for my old desktop.

Thanks for the input.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

Re: How to switch from Grub4Dos to Grub2?

#6 Post by Mike Walsh »

TorontoBoy wrote:How can I switch from Grub4Dos to Grub2 so that I can also load either Debian or Ubuntu into sd6?
Yuk.

Gods above, man, why would you want to? GRUB2 is horrible; bloated, overly-complex, and insists on re-writing itself every time you make any changes to your system.

Whoever dreamt it up wants putting over his Mum's knee, given a sound spanking, and told to buck his ideas up..! :!: :roll:

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

There's a coupla ways round this.

I always found the best way is to install the 'alternative' distro as normal, to the desired location, then powering down. Then, use a Puppy LiveCD (or a 'Pup on a stick') to re-run Grub4DOS config while your main hard drive is unmounted. I guarantee Pup will find your Debian or Ubuntu install.

The other method is to let your distro install GRUB 2 to its own partition, then 'chainload' it from your Grub4DOS menu.

Mind you, if Debian or Ubuntu are only 'seeing' an entire, single-disk partition, I'm not too sure what's going on there. I guess Bird Dog's idea would hold water; install Ubuntu or Debian first, partitioning to leave space for Pup, of course; installing them to sda1, then creating sda2 and installing Pup to that afterwards. Then run Grub4DOS.....which will overwrite GRUB2 in the MBR. Which is what you want.

As the other Mike says, the crux of the matter is, quite simply, that GRUB2 doesn't recognise the Puppy 'frugal' install, and therefore doesn't see it. Rather in the same way that Windoze doesn't 'see' Linux, in any shape or form.....


Mike. :wink:

hamoudoudou

Re: How to switch from Grub4Dos to Grub2?

#7 Post by hamoudoudou »

Manjaro downloading
i will try via Lili Live usb Creator from Windows 7
and ISOBOOTER from Puppy Linux our efficient OS
Grub2 ???? look at Ubuntu forum... good for Ubuntu, bad for Puppy.
Isobooter is better.. Big Manjaro beside Little Puppy Booted as it should..
Isobooter is based on Grub4Dos, isn't it ?
Attachments
Isobooter.jpg
ext2 for Linux files storage
(29.04 KiB) Downloaded 146 times
Last edited by hamoudoudou on Thu 28 Jun 2018, 04:58, edited 2 times in total.

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

Re: How to switch from Grub4Dos to Grub2?

#8 Post by s243a »

Mike Walsh wrote:Mind you, if Debian or Ubuntu are only 'seeing' an entire, single-disk partition, I'm not too sure what's going on there. I guess Bird Dog's idea would hold water; install Ubuntu or Debian first, partitioning to leave space for Pup, of course; installing them to sda1, then creating sda2 and installing Pup to that afterwards. Then run Grub4DOS.....which will overwrite GRUB2 in the MBR. Which is what you want.

As the other Mike says, the crux of the matter is, quite simply, that GRUB2 doesn't recognise the Puppy 'frugal' install, and therefore doesn't see it. Rather in the same way that Windoze doesn't 'see' Linux, in any shape or form.....


Mike. :wink:
You must mean the various configuration tools can't see puppy. I'm pretty sure you can manually install it. If one installs debian or Ubuntu first then from what I read they can edit /boot/grub/grub.cfg or 40_custom to something like:

Code: Select all

40_custom
menuentry "quirky-130 (on /dev/sdc3)" {
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set c87ab663-e503-4833-8b7c-f52a114f8ad0
linux /qrky-130/vmlinuz pdev1=sdc3 psubdir=quirky130
initrd /qrky-130/initrd.gz
}
http://puppylinux.org/wikka/Grub2

not that if you edit 40_custom you need to run, "update-grub"

If you don't install something like Ubuntu or debian first it is a little more complicated. I think you have to do something like:

Code: Select all

#!/bin/sh
#https://askubuntu.com/questions/254491/failed-to-get-canonical-path-of-cow
MTpoint="/mnt/sdc1"
Mtdev="/dev/sdc1"
mkdir "$MTpoint"
mkdir "$MTpoint/boot"
mount "$Mtdev" "$MTpoint"
for dir in proc dev sys etc bin sbin var usr lib lib64 tmp; do
  mkdir "$MTpoint/$dir" && mount --bind /$dir "$MTpoint/$dir"
done
chroot "$MTpoint"
#update-grub2  # Type this at the prompt in the chroot environment
http://www.murga-linux.com/puppy/viewto ... 718#988718

but I think before you do that you have to install the boot image:
https://pete.akeo.ie/2014/05/compiling- ... 2-for.html

This is all very complicated. Fred I believe has an easier solution:
http://www.murga-linux.com/puppy/viewto ... 722#988722

BTW grub4dos won't work on a gpt partition so if you have a gpt formatted drive, then you'll need some other tool like grub2.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#9 Post by Mike Walsh »

@ s243a:-

The only thing that really niggles me about GRUB 2 is the size of the entries. I cannot for the life of me understand why, if Grub4DOS can boot Pup with a single, 3 or 4 line entry, why does GRUB2 need 3 times as many lines to achieve the same result?

To my way of thinking, it's just one of the many examples that have given rise to the all-encompassing myth that Linux is hard to use. I mean, who else but hard-core 'geeks' would actually enjoy using summat that awkward?

(*shakes head in disbelief*)

Me, I'm all for sticking to the K.I.S.S principle. Every time.


Mike. :wink:

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#10 Post by rcrsn51 »

Mike Walsh wrote:The only thing that really niggles me about GRUB 2 is the size of the entries. I cannot for the life of me understand why, if Grub4DOS can boot Pup with a single, 3 or 4 line entry, why does GRUB2 need 3 times as many lines to achieve the same result?
It doesn't. You can make a valid GRUB2 entry with the same number of lines. You just need to spend a few minutes learning the new syntax.

The stretch-live-frugal-installer has a tool that auto-converts a Grub4Dos entry into GRUB2.

21js
Posts: 13
Joined: Thu 26 Apr 2012, 15:56

How to switch from Grub4Dos to Grub2?

#11 Post by 21js »

have a look at ubuntu Grub2/CustomMenus

you might try

Install Debian or Ubuntu - setting up Grub2 and when it boots ok

go to boot/grub and create a text file custom.cfg

along the lines of

menuentry "tahr"{
set root=(hd0,x)
linux /puppy/tahr/vmlinuz pmedia=atahd pfix=copy psubdir=puppy/tahr
initrd /puppy/tahr/initrd.gz
}


where x is the partition with the frugal install of Tahr

(you could use puppy on a stick/cd to do this)

Then boot into Debian or Ubuntu and from the command line run sudo update-grub

Then reboot Debian or Ubuntu and your puppy should be on the menu.

best wishes

jafadmin
Posts: 1249
Joined: Thu 19 Mar 2009, 15:10

#12 Post by jafadmin »

I suspect Debian didn't figure out you had a GPT partition table on the sda disk and was expecting an MSDOS partition table, instead.

Maybe you need to explicitly select GPT during the install process.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#13 Post by rcrsn51 »

jafadmin wrote:I suspect Debian didn't figure out you had a GPT partition table on the sda disk and was expecting an MSDOS partition table, instead. Maybe you need to explicitly select GPT during the install process.
????
The OP said that Grub4Dos worked, so he could NOT have a GPT drive, because G4D ONLY works with MS-DOS partition tables.

jafadmin
Posts: 1249
Joined: Thu 19 Mar 2009, 15:10

#14 Post by jafadmin »

rcrsn51 wrote: The OP said that Grub4Dos worked, so he could NOT have a GPT drive, because G4D ONLY works with MS-DOS partition tables.
MSDOS partition tables only allow 4 partitions. There is obviously more to this story.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#15 Post by rcrsn51 »

jafadmin wrote:MSDOS partition tables only allow 4 partitions.
Four PRIMARY partitions. We can assume that sda3 is an EXTENDED partition with several logical partitions.

But that may be the source of the original problem. Debian/Ubuntu want to install into a primary (bootable) partition and can't find one they like.

jafadmin
Posts: 1249
Joined: Thu 19 Mar 2009, 15:10

#16 Post by jafadmin »

rcrsn51 wrote: Four PRIMARY partitions. We can assume that sda3 is an EXTENDED partition with several logical partitions.

But that may be the source of the original problem. Debian/Ubuntu want to install into a primary (bootable) partition and can't find one they like.
Sounds legit.

Post Reply