Grub4DosConfig

Miscellaneous tools
Message
Author
User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#141 Post by smokey01 »

Using grub4dosconfig:
1. Delete the existing partition
2 Create new partition table (Device >> Create Partition Table)
3. Create any filesystem partition (formatted)
4. (Optionally) Make a directory for puppy files.
5. Manually copy puppy files to Flash drive
6. Run the grub4dosconfig GUI
It worked like a charm. I missed step2.

Thanks

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

partition table

#142 Post by shinobar »

smokey01 wrote:
Using grub4dosconfig:
1. Delete the existing partition
2 Create new partition table (Device >> Create Partition Table)
3. Create any filesystem partition (formatted)
4. (Optionally) Make a directory for puppy files.
5. Manually copy puppy files to Flash drive
6. Run the grub4dosconfig GUI
It worked like a charm. I missed step2.
Thanks smokey for testing.
The problem comes from the incompatibility of the partition tables between 'BootFlash' and the Grub4Dosconfig v1.6.x.
I will check the partition table in next version of grub4dosconfig.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#143 Post by smokey01 »

Stripe wrote:Hi all

Have just done a frugal install of 511 to a usb stick as follows:

1. reformatted usb to EXT2 (gparted checking boot flag)
2. copied puppy files to usb
3. Ran grub4dos-0.4.4.v1.6.2

No problems, gave me the correct options for all my hard drive installations (puppy and non-puppy linux as well.)

Stripe
Stripe, what I found really interesting is I did not need to check the boot flag with Gparted.

User avatar
piratesmack
Posts: 100
Joined: Wed 16 Sep 2009, 14:22

#144 Post by piratesmack »

Shinobar, somebody commented on Barry's blog about their Windows install being broken after installing Grub4dos:
http://bkhome.org/blog/?viewDetailed=01986

I'm not sure what went wrong.

Maybe the "wee" boot code is too large and overwrote something important? Or maybe there is just something wrong with the code I gave you? (I never tested it with Windows)

I think it might be a good idea to go back to the old method, using Grub legacy to chainboot Grub4dos from ext4 :(

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

#145 Post by nooby »

Shinobar and piratesmack ,

This is exactly??? what I experienced and luckily asked you Shinobar while that guy asked Barry instead .

http://bkhome.org/blog/?viewDetailed=01986
Posted on 23 Nov 2010, 3:40 by broomdodger
grub scrub
HP Media Center m7160n

After installing grub4dos

Wary098 started with no problem, but when starting Windows XP the System Recover appeared. I shutdown and checked the menu.lst and it was the same as a Dell notebook similarly configured.

I was able to open System Console but these did not fix it:
fixmba
fixboot

I let System Recover run, did all the MS updates and tried again with the same result ;(

I did not lose any data, but it is a PITA.

Any idea how to gracefully recover?

Delete

Posted on 23 Nov 2010, 5:42 by steve p
re: grub scrub
Grub4dosconfig should have backed up your MBR to a file called sda_mbr.bak (or similar) on your boot partition.

You should be able to restore with:


cat sda_mbr.bak > /dev/sda



I'll look into this some more.

If there is an issue it was likely caused by some code I gave shinobar.
Sorry about that.
Delete

Posted on 23 Nov 2010, 5:45 by steve p
re: grub scrub
Grub4dosconfig should have backed up your MBR to a file called sda_mbr.bak (or similar) on your boot partition.

You should be able to restore with:


cat sda_mbr.bak > /dev/sda



I'll look into this some more.

If there is an issue it was likely caused by some code I gave shinobar.
Sorry about that.
And by your help I could get it to load the right code instead of the recovery.

Unfortunately for him maybe him being too fast on the trigger going along with recovery changed the links to the older install of Windows.

So could be tricky to find a way back now.

Shinobar you gave me a better menu.lst code that actually changed to another partition so it loaded the right windows partition but I had forgot the password so I don't know if windows really works But it did look okay as far as it allowed me to go having now password to log in.
Last edited by nooby on Mon 22 Nov 2010, 22:12, edited 1 time in total.
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

How to install puppy to a usb flash drive

#146 Post by smokey01 »

http://www.smokey01.com/grant/Puppy on a USB Flash Drive.mpeg

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

Re: How to install puppy to a usb flash drive

#147 Post by shinobar »

Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

Sector/Track

#148 Post by shinobar »

My ATA CFD CSSD-SM64NJ2 has 19 sectors/track!
(But no problem found with the grub4dosconfig v1.6.x.)
# fdisk -l /dev/sda
Disk /dev/sda: 64.0 GB, 64023257088 bytes
224 heads, 19 sectors/track, 29380 cylinders
Units = cylinders of 4256 * 512 = 2179072 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 49 102400 7 HPFS/NTFS
/dev/sda2 49 14680 31134720 7 HPFS/NTFS
/dev/sda3 14680 19617 10506510 83 Linux
/dev/sda4 19617 29379 20772045 5 Extended
/dev/sda5 19617 28382 18651433+ 83 Linux
EDIT:
Mybe i got it :idea:
My ATA CFD CSSD-SM64NJ2 has 19 sectors/track, but the start point of the first partition is at 0x800(LBA), 2048 in decimal, means having enough space for the boot loader.
But the BootFlash makes 32 sectors/track, and the start point of the first partition is at 0x20(LBA), 32 in decimal, means having less space for the large boot loader.
We can see the start point of the first partition examining the 3 bytes, 0x1c6-0x1c8, in the MBR.

I think the structure the BootFlash makes is breaking the usual rule.
Last edited by shinobar on Tue 23 Nov 2010, 08:08, edited 3 times in total.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

Stripe
Posts: 658
Joined: Wed 23 Jun 2010, 05:18
Location: In a field. England

#149 Post by Stripe »

Smokey
That is great :lol: , Well done
that will help a lot of people
Stripe

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

#150 Post by nooby »

Shinobar

here is how it looks on my Acer D250 with Win7Starter
it has wubi for Ubuntu on it but not sure if that shows up.

# fdisk -l /dev/sda

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 1567 12586896 27 Unknown
/dev/sda2 * 1568 1580 104422+ 7 HPFS/NTFS
/dev/sda3 1581 30402 231506210 7 HPFS/NTFS
#


menu.lst ended up on Sda1 but should be on Sda3 where all Linux stuff is on.

Sda1 or Sda2 has the recovery thing on it. I guess that is how it is for the guy that if failed for too writing on Barry's blog.

So if he did same change in the menu.lst that you told me than most likely he would boot windows correctly unless his recovery thing he did messed it up
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

Windows recovery on HDD

#151 Post by shinobar »

nooby wrote:# fdisk -l /dev/sda

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 1567 12586896 27 Unknown
/dev/sda2 * 1568 1580 104422+ 7 HPFS/NTFS
/dev/sda3 1581 30402 231506210 7 HPFS/NTFS
Thanks for your PC's information.
Humm.. the first partition (Unknown) is questionable. Can you see inside sda1 from Puppy?
Will you show me the result of probepart?

Code: Select all

probepart
I guess:
  • sda1 is the recovery system.
  • sda2 is normal boot of Windows, you can see 'Boot' directory in it?
  • sda3 is where main Windows system, you can see 'Windows' directory in it? And maybe this is 'C:' from the Windows 7.
Right?
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

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

#152 Post by nooby »

Sorry delay have to go buy food. :)
# probepart
/dev/sda1|ntfs|25173792
/dev/sda2|ntfs|208844
/dev/sda3|ntfs|463012420
#

Sda1 have

acerboot
boot
systemvolumeinformation
factory
sources

and it have mbr
and your mbr backup sda_mbr.bak
and menu.lst

Sda2 have
boot
systemvolumeinformation
bootmgr


Sda3 has
all the rest. windows and puppy and most likely is seen as root.

So the boot mbr backup and menu.lst seems to have ended up in the recovery partition?

Unless sda2 is something else?
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

recovery partition

#153 Post by shinobar »

nooby wrote:# probepart
/dev/sda1|ntfs|25173792
/dev/sda2|ntfs|208844
/dev/sda3|ntfs|463012420
What i guessed.
nooby wrote:So the boot mbr backup and menu.lst seems to have ended up in the recovery partition?
Unless sda2 is something else?
Maybe no problem the grldr, menu.lst and sda_mbr.bak on sda1 when Puppy can access them.
The problem was the boot menu mislead to the recovery windows on sda1 instead of the usual Windows boot from sda2.
It is fixed with grub4dosconfig v1.6.1 and later.
Thanks.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

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

#154 Post by nooby »

So what do you suggest the poor fellow that complained to Barry should do.

As I get it he had same problem like I had only that he actually used the recovery not being aware of that one needed to change the menu.lst like you told me to.
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

MBR issue

#155 Post by shinobar »

nooby wrote:So what do you suggest the poor fellow that complained to Barry should do.
As I get it he had same problem like I had only that he actually used the recovery not being aware of that one needed to change the menu.lst like you told me to.
I am sorry with the broomdodger case and sorry i was lacking knowledge on the special installation of windows.
But i believe recent grub4dosconfig is safe thanks to the information from nooby and Barry.
I know the way ICPUG provides are safe as for the Windows Xp, because it is easy to edit 'boot.ini' in case Windows Xp.
But we also needs univarsal way when the Windows 7 era. I think it is not safe for newbies editing boot configurations manually.

We may need to encourage to make rescue media to see how it works before applying the grub4dos on the hard disk.
http://www.murga-linux.com/puppy/viewtopic.php?t=61348
Of course i proceed refining the grub4dosconfig more easy and safe.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

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

#156 Post by nooby »

Thanks Shinobar,

much appreciated that you care.
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
broomdodger
Posts: 279
Joined: Sat 10 May 2008, 02:38
Location: Santa Cruz, CA

grub and Lin'N'Win

#157 Post by broomdodger »

grub and Lin'N'Win
I had trouble with grub4dos on this particular machine, HP Media Center m7160n with Windows XP. I do not know if it was the MBR or the menu.lst. I tried fixmbr, fixboot and many different menu.lst settings with no joy. Previously on several other machines I installed grub or grub4dos no problem.

Not being able to gracefully recover the WinXP install, I let System Recover do its thing, grrr, then all the Windows updates and hours later the WinXP is running again. I lost time but no data, well this PC tower is going to a friend so there really was not much to lose.

That said, I ALWAYS want the option to boot Windows or Linux, though Linux is where I work.

Why would anyone choose to do a grub[4dos] install that would write the MBR?

NOW I know there is a safer and simpler alternative!
Thank you for all the suggestions, especially "Lin'N'Win".
<http://www.icpug.org.uk/national/linnwi ... innwin.htm>

Next task... restore the MBR on a working grub install and change to "Lin'N'Win".

Has anyone sucessfully used "Lin'N'Win" with Windows ME?

ICPUG
Posts: 1308
Joined: Mon 25 Jul 2005, 00:09
Location: UK

#158 Post by ICPUG »

broomdodger,

No one has successfully used Lin'N'Win with Windows ME unless they have seriously messed with ME!

ME has real mode DOS turned off - in an effort to speed the boot process (and pretend that Windows is not reliant on DOS?).

Lin'N'Win hooks into the Windows 9X boot process via config.sys which uses real mode DOS.

It IS possible to turn real mode DOS back on. Google for 'windows me real mode' and you will see links. Once you do that it should be possible to use Lin'N'Win but I don't know of anyone who has done it.

May I also take the opportunity to ask you to read the technical page on the Lin'N'Win site about the changes needed if Windows is not located on the first partition of the first disk, which Shinobar thinks was the reason for your problems on that HP Media Centre PC. Lin'N'Win will not break Windows if this is the case but it needs some adjustment to menu.lst to get Linux booted.

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

#159 Post by nooby »

broomdodger,

Here is the menu.lst code that Shinobar gave me and that actually did work.

You could at least try it. If it goes to teh wrong part you only have to gracefully shut down from windows.

Nothing wrong can happen as long as you don't say yes to any command they ask for to get completed.

I had same experience as you but did not go ahead with the recover process. I backed out of that one and asked Shinobar what to do instead and he came up with a working solution

# Windows

title Windows Vista/2008/7\nBoot up Windows Vista/2008/7 if installed
rootnoverify (hd0,1)
chainloader /bootmgr

As I get it this allow me to boot any OS on the machine as long as I get code to the initrd if it is a puppie or maybe initrd.lz if it is older type ubuntu.
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
broomdodger
Posts: 279
Joined: Sat 10 May 2008, 02:38
Location: Santa Cruz, CA

#160 Post by broomdodger »

ICPUG wrote:broomdodger,
No one has successfully used Lin'N'Win with Windows ME unless they have seriously messed with ME!

ME has real mode DOS turned off - in an effort to speed the boot process (and pretend that Windows is not reliant on DOS?).

Lin'N'Win hooks into the Windows 9X boot process via config.sys which uses real mode DOS.

It IS possible to turn real mode DOS back on. Google for 'windows me real mode' and you will see links. Once you do that it should be possible to use Lin'N'Win but I don't know of anyone who has done it.
Thank you, for the info about WinME. From the (your?) Lin'N'Win site it seemed given that it worked. I keep some old PCs around for testing. On that WinME PC I will go back to grub and MBR as it worked.
ICPUG wrote:May I also take the opportunity to ask you to read the technical page on the Lin'N'Win site about the changes needed if Windows is not located on the first partition of the first disk, which Shinobar thinks was the reason for your problems on that HP Media Centre PC. Lin'N'Win will not break Windows if this is the case but it needs some adjustment to menu.lst to get Linux booted.
I thought I mentioned having another PC configured similarly, partitions, wary, menu.lst and it worked writing the MBR, but not this HP Media Center. It has been "restored", upgraded and is going to a friend. So... I will never know the problem.

But... I have some other PCs not spoken for that I will try.

Question: I read, maybe on the Lin'N'Win site, something about compatibility with Windows 7 and Lin'N'Win -- that it may be more compatible to use grub4dos. What can you tell me about that?
-Bill

Post Reply