View Full Version : Grub
risk_reversal
10-28-2009, 02:02 PM
I have Puppy & Muppy installed on a pc (also xp).
I wanted to remove Muppy. I was going to use GParted to delete that ext3 partition, however I am unsure as to how to make sure that Grub is correctly updated. I guess that just removing the bold entries in menu.lst (below) will remove the Muppy boot option but what else is required...?
By way of further info, when I originally installed Puppy I followed the wizard to create grub and I think selected the MBR record option (and so wanted to make sure that these will be correct after Muppy removal).
Below is the info from /boot/grub/menu.lst located in sda2 (the grub folder on hdc4 ie Muppy is empty)
# GRUB configuration file '/boot/grub/menu.lst'.
# generated by 'grubconfig'. Sat Oct 24 21:35:55 2009
#
# The backup copy of the MBR for drive '/dev/hdc' is
# here '/boot/grub/mbr.hdc.6475'. You can restore it like this.
# dd if=/boot/grub/mbr.hdc.6475 of=/dev/hdc bs=512 count=1
#
# Start GRUB global section
#timeout 30
color light-gray/blue black/light-gray
# End GRUB global section
# Other bootable partition config begins
title Windows (on /dev/sda1)
rootnoverify (hd0,0)
makeactive
chainloader +1
# Other bootable partition config ends
# Linux bootable partition config begins
title Puppy Linux (on /dev/sda2)
root (hd0,1)
kernel /boot/vmlinuz root=/dev/sda2 rw vga=normal
# Linux bootable partition config ends
# Linux bootable partition config begins
title Muppy Linux (on /dev/hdc4)
root (hd0,3)
kernel /boot/vmlinuz root=/dev/hdc4 rw vga=normal
# Linux bootable partition config ends
title Install GRUB to floppy disk (on /dev/fd0)
pause Insert a formatted floppy disk and press enter.
root (hd0,1)
setup (fd0)
pause Press enter to continue.
title Install GRUB to Linux partition (on /dev/sda2)
root (hd0,1)
setup (hd0,1)
pause Press enter to continue.
title - For help press 'c', then type: 'help'
root (hd0)
title - For usage examples, type: 'cat /boot/grub/usage.txt'
root (hd0)
Many thanks for any info provided
Cheers
Sylvander
10-28-2009, 04:55 PM
Being something of a Puppy newbie myself, I'm hesitant to advise, but....
It all looks good to me.
Nothing extra requires to be done.
GRUB on your MBR doesn't need any alteration.
The menu.lst file is on your Puppy partition [sda2] NOT on your Muppy partition [hdc4].
[Hence eliminating hdc4 will NOT interfere; you're NOT eliminating the menu.lst file]
If you remove the entry in bold, then GRUB won't offer the option to boot to [Muppy on] a non-existent partition.
You might want to wait for a more expert 2nd opinion.
I only have one Puppy conventional installation [to an ext3 partition on the internal HDD].
Muppy I would boot using a live DVD, with a pupsave file in the root of some handy partition [a small dedicated (Linux or FAT32?)]
I also have a Puppy installed to a 1GB Flash Drive.
[booted using a "WakePup2" floppy in my case, because my PC's BIOS doesn't boot USB]
Having them installed to different locations is good.
e.g. When using the Puppy on the Flash Drive, none of the HDD partitions are mounted, and therefore they are not "locked" in GParted, so can be manipulated.
Any Puppy can be used to work on [or fix] the others or Windows.
Have you made a Linux swap partition?
Only ever likely to be needed if your PC is short on RAM.
I only have 256MB, and swap is seldom used.
risk_reversal
10-29-2009, 04:27 AM
Sylvander said:
It all looks good to me.
Nothing extra requires to be done.
GRUB on your MBR doesn't need any alteration.
The menu.lst file is on your Puppy partition [sda2] NOT on your Muppy partition [hdc4].
[Hence eliminating hdc4 will NOT interfere; you're NOT eliminating the menu.lst file]
If you remove the entry in bold, then GRUB won't offer the option to boot to [Muppy on] a non-existent partition.
Well must admit that is what I originally thought but some of the files within the grub folder itself have changed in size. I saved a copy of that folder prior to install of Muppy and can see some differences. I am not sure if those differences are important or indeed whether removing Muppy and editing the menu.lst file will also change the content of the grub folder.
Don't know enough about Puppy yet to hazard a good guess.
By way of some info. When I installed Muppy to hard disk the install too about 2Gb [vs dvd size of 800mb] which surprised me. I did the full install against the warning not to and go for the frugal install instead but everything went ok.
At the end of the install the same wizard which appeared after the Puppy install asked about installing grub and the location of install. Knowing that a grub folder already existed I told the wizard to put it into sda2. However after doing this, all the syntaxes ie sda1, sda2, [which originally existed on Puppy menu.lst] were changed to hdc1, hdc2, and I had to edit the menu.lst file in sda2 and change them to allow for proper booting.
In fact I just noticed that I missed an edit above which refers to hdc
# GRUB configuration file '/boot/grub/menu.lst'.
# generated by 'grubconfig'. Sat Oct 24 21:35:55 2009
#
# The backup copy of the MBR for drive '/dev/hdc' is
# here '/boot/grub/mbr.hdc.6475'. You can restore it like this.
# dd if=/boot/grub/mbr.hdc.6475 of=/dev/hdc bs=512 count=1
/boot/grub/mbr.hdc.6475 does not exist but /boot/grub/mbr/sda.6475 does
When I originally installed Muppy, perhaps I did not follow the correct install proceedure in amending grub to take into account the Puppy installation.
Wonder what the first few lines of menu.lst actually mean
# The backup copy of the MBR for drive '/dev/hdc' is
# here '/boot/grub/mbr.hdc.6475'. You can restore it like this.
# dd if=/boot/grub/mbr.hdc.6475 of=/dev/hdc bs=512 count=1
Sylvander said:
Have you made a Linux swap partition?
Only ever likely to be needed if your PC is short on RAM.
I only have 256MB, and swap is seldom used.
No did not bother as the laptop I am using has 512Mb of ram.
Still many thanks for your help. Hope someone with more info can jump in otherwise it may be a long trawl on the various Linux forums for me.
Cheers
Sylvander
10-29-2009, 06:14 AM
1. "When I installed Muppy to hard disk the install too about 2Gb [vs dvd size of 800mb] which surprised me"
Puppy has some wonderful tricks it uses, and this is one of them I think.
When you boot using a "live" optical disk [in the case of Muppy it's a DVD]...
There is a a file [forgotten which] that is kept in a compressed state [to minimize space used], and when anything is needed from it, it is decompressed "on-the-fly".
I'd guess that this file is being decompressed when you complete a conventional install to a partition on the internal HDD.
I know Muppy is a big Puplet, but I'm still somewhat surprised at the 2GB; my BoxPup is only using 1.5GB after quite a long time in use, with all kinds of stuff installed to it.
2. "At the end of the install the same wizard which appeared after the Puppy install asked about installing grub and the location of install. Knowing that a grub folder already existed I told the wizard to put it into sda2"
I've never tried multiple conventional installs of Puppy, but...
I think there was no need to complete a 2nd install of GRUB; only the existing install of GRUB was needed.
But you would have needed to edit the existing menu.lst file to include Muppy.
3. "all the syntaxes ie sda1, sda2, [which originally existed on Puppy menu.lst] were changed to hdc1, hdc2"
That's an unfortunate consequence of the fact that older Puppies and their puplets used hdxx, whereas the newer versions use sdxx.
The menu.lst file references would need to use the actual names [given to partitions etc] by each Puppy/puplet.
4. "In fact I just noticed that I missed an edit above which refers to hdc"
Those would be using the naming convention used by [the older] Muppy.
If [as you aught] you hadn't used Muppy to install a 2nd instance of GRUB, that problem would not have been introduced.
5. "# The backup copy of the MBR for drive '/dev/hdc' is
# here '/boot/grub/mbr.hdc.6475'. You can restore it like this.
# dd if=/boot/grub/mbr.hdc.6475 of=/dev/hdc bs=512 count=1 "
No need to restore the Puppy MBR+GRUB, because they are both the same.
[They would have been different had you told Muppy to install GRUB to the Muppy partition, but you didn't]
If you were to run that command from Muppy, I guess it would work OK because Muppy would name the HDD hdc [Puppy names it sdc?]
6. "/boot/grub/mbr.hdc.6475 does not exist"
That wouldn't exist when running within your Puppy [which version?]...
But WOULD EXIST when running within Muppy.
Strange, but true methinks!
7. "/boot/grub/mbr/sda.6475 does"
Only when working in your Puppy, but not when working within your Muppy.
Get it?
8. "Wonder what the first few lines of menu.lst actually mean"
When you were installing GRUB from Muppy [having just installed Muppy]...
And installed it to the existing Puppy partition...
And GRUB noticed that a previous GRUB was already in place [on the MBR etc]...
GRUB would automatically backup the previously installed items.
In that case the copy of the MBR.
9. "No did not bother as the laptop I am using has 512Mb of ram"
You may at some point [if any Puppy is ever in need of more RAM than is installed] discover that a Linux swap partition is needed.
Keep your wits alert for the time if/when that happens.
e.g. You may find it's not possible to remove the optical disk [to make use of it for purposes other than running the Puppy OS].
risk_reversal
10-29-2009, 05:21 PM
Sylvander said:
I know Muppy is a big Puplet, but I'm still somewhat surprised at the 2GB
So was I. I created a 3Gb partition thinking that this would be way over the top and after install saw that there was only 1Gb left.
Sylvander said:
I think there was no need to complete a 2nd install of GRUB; only the existing install of GRUB was needed.
But you would have needed to edit the existing menu.lst file to include Muppy.
Probably right their, I was sure that I messed it up at the time as it all felt wrong. I am not that good with this stuff still on the steep(ish) learning curve.
Sylvander said:
That wouldn't exist when running within your Puppy [which version?]...
But WOULD EXIST when running within Muppy.
Strange, but true methinks!
Running Puppy v4.2. mbr.hdc.6475 does not exist even if I boot into Muppy and look into the boot/grub directory, it's totally empty.
Sylvander said:
You may at some point [if any Puppy is ever in need of more RAM than is installed] discover that a Linux swap partition is needed.
Keep your wits alert for the time if/when that happens.
e.g. You may find it's not possible to remove the optical disk [to make use of it for purposes other than running the Puppy OS].
Cheers, I will keep that in mind.
I think I will probably go ahead and just delete the Muppy partition and remove the relevant listing in menu.lst and see what happens.
I did save a copy of the /boot/grub directory from sda2 prior to installing Muppy (and messing about with Grub) so I guess at the end of the day I could always copy the original folder back if there are any issues.
I will let you know how I get on, may be useful for future reference.
Good Luck
Sylvander
10-29-2009, 07:07 PM
1. "I created a 3Gb partition thinking that this would be way over the top and after install saw that there was only 1Gb left"
I found that using [for example] the Windows portable program = "Space Monger" [run under WINE], to study the usage of space on a partition [it gives a really good graphical display], would sometimes show some quite astonishing things using huge amounts of storage space.
I once found that a backup being made by SyncBack...
Because the destination partition had not been mounted [I'd forgotten to do it]...
Had for some strange reason been saved instead in the OS [BoxPup] file system. :(
It had saved only 1GB of the many GB's it would have if it had been able to complete, but it ran out of space once the 3GB BoxPup partition had been FILLED.
I found the 1GB of folders and files and deleted them, and all the space was recovered. :)
WHEW!
2. "Running Puppy v4.2. mbr.hdc.6475 does not exist even if I boot into Muppy and look into the boot/grub directory, it's totally empty"
Where did you look?
In both the Muppy and the Puppy file system boot/grub directory?
Or perhaps GRUB didn't need to make a backup of the "old" MBR because there was no need to change the MBR, therefore there was no "new" MBR.
3. "I think I will probably go ahead and just delete the Muppy partition"
It would be good to make [image and/or folder/file?] backups of both the Muppy and the Puppy partitions, so if anything turns nasty you can get back to the way things were.
That would give you the ability to begin again, but knowing more [the pitfalls] the 2nd time around.
Xfe is great for copying/restoring partition folder/file contents.
risk_reversal
10-29-2009, 07:38 PM
Sylvander said:
2. "Running Puppy v4.2. mbr.hdc.6475 does not exist even if I boot into Muppy and look into the boot/grub directory, it's totally empty"
Where did you look?
In both the Muppy and the Puppy file system boot/grub directory?
If I boot into Puppy (sda2), boot/grub directory exits and is populated with files inc menu.lst. If I boot to Muppy (hdc4), boot/grub directory exist but is empty, nothing in it.
Sylvander said:
Or perhaps GRUB didn't need to make a backup of the "old" MBR because there was no need to change the MBR, therefore there was no "new" MBR.
It's possible yes. Don't know enough about it yet.
Sylvander said:
3. "I think I will probably go ahead and just delete the Muppy partition"
It would be good to make [image and/or folder/file?] backups of both the Muppy and the Puppy partitions, so if anything turns nasty you can get back to the way things were.
That would give you the ability to begin again, but knowing more [the pitfalls] the 2nd time around.
Xfe is great for copying/restoring partition folder/file contents.
IforDos time again. I just finished fixing my daughter's Dell laptop. It took me three complete dismantles to finally track down the problem. I am worn out.
Wish there was just a simple solution in this case.
Cheers
Sylvander
10-30-2009, 03:33 AM
1. "If I boot into Puppy (sda2), boot/grub directory exits and is populated with files inc menu.lst. If I boot to Muppy (hdc4), boot/grub directory exist but is empty"
Be aware that you can navigate to the Muppy files whilst running within Puppy, and vice versa.
2. "IforDos time again"
You might want to also try out Pudd ["Puppy Universal Disk Dump"] to make/restore image backups.
It comes natively with all Puppies/Puplets.
I also use Xfe and SyncBack->[under WINE] to backup/restore folder/file contents.
SyncBack is particularly good because it displays "differences", and only does the work necessary to deal with the [few?] differences, so might take only a minute or two to complete.
3. "Wish there was just a simple solution in this case"
There is...
Only SEEMS not so simple to us beginners.
And you are just being prudent by "looking before you leap".
Hopefully once you've done it, it will then seem so easy.
Something I like about Puppy Linux is the way it's possible to get into the workings to fix/change things.
Seems you're only limited by what you know.
risk_reversal
10-30-2009, 04:55 AM
Sylvander said:
1. "If I boot into Puppy (sda2), boot/grub directory exits and is populated with files inc menu.lst. If I boot to Muppy (hdc4), boot/grub directory exist but is empty"
Be aware that you can navigate to the Muppy files whilst running within Puppy, and vice versa.
Yes, I am aware and I did have a look at the Muppy grub folder from Puppy too. I just thought that if I boot into the relevant version ie Puppy or Muppy there would be no grey area as to whether the directory was populated or not. If you see what I mean.
Sylvander said:
2. "IforDos time again"
You might want to also try out Pudd ["Puppy Universal Disk Dump"] to make/restore image backups.
It comes natively with all Puppies/Puplets.
I also use Xfe and SyncBack->[under WINE] to backup/restore folder/file contents.
SyncBack is particularly good because it displays "differences", and only does the work necessary to deal with the [few?] differences, so might take only a minute or two to complete.
I did try dd once but got a bit scared as it all went pear shaped. So settled on IforDos for now. Will give dd a try again soon.
Sylvander said:
3. "Wish there was just a simple solution in this case"
There is...
Only SEEMS not so simple to us beginners.
You are right there.
Sylvander said:
Something I like about Puppy Linux is the way it's possible to get into the workings to fix/change things.
Seems you're only limited by what you know.
And in the fullness of time I may perhaps learn this too.
I did learn a lot about Puppy's / Linux syntaxes [rcvt box] when I had issues with my wifi card [wpa] and which I had to finally configure manually but all this ifconfig wlan0 and iwconfig wlan0, it's back to dos.
Good Luck
Sylvander
10-30-2009, 05:36 AM
1. "I did try dd once but got a bit scared as it all went pear shaped. So settled on IforDos for now"
(a) Pudd has a convenient GUI that uses dd in the background.
It makes the use of dd much safer.
You explicitly make choices by clicking on buttons, and the GUI takes care of the nuts ans bolts of how the job gets done.
(b) Some time back, Pudd was acting rather weird.
I must have done something to cause it.
Instead of getting on with the backup, it would cause the PC to make weird screaming noises, and do no backing up.
I was able to pull a trick to avoid the problem...
Then eventually it just disappeared.
I guess I did something to fix it, but don't know what.
(c) IforD was certainly always totally RELIABLE.
It never did anything wrong.
But it's so much nicer to be able to make backups in the background [within an OS], whilst doing other things like posting replies at the PC-Guide.
2. "all this ifconfig wlan0 and iwconfig wlan0"
Thank goodness I haven't had to do any of that stuff.
I've made a few interesting fixes recently though.
e.g. In the BoxPup OS [the other 2 later Puppies were OK] I couldn't get the CUPS system to install my HP_Deskjet_840c printer.
Found a PET file to install a later version of CUPS and that fixed it.
It's amazing how something can refuse to work at one time, then JUST WORK when you do the right thing!
vBulletin v3.6.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.