Grub4DosConfig

Miscellaneous tools
Post Reply
Message
Author
Stripe
Posts: 658
Joined: Wed 23 Jun 2010, 05:18
Location: In a field. England

#136 Post by Stripe »

I usualy install grub with the installer, then add the puppy manualy and write the entry to the grub menu, with grub4dos I have just been writing the grub for the hard drives to usb (trying it for security, needing the usb to boot the selected puppys)

I have found when booting from a usb drive that it makes itself hd0,0 making my (normaly) hd0 hard drive hd1 but grub4dos in luci 238 recognises this and alters the grub menu accordingly.

will try an install to a usb then use grub4dos to write the boot record and let you know how I get on.

Cheers
Stripe

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

#137 Post by smokey01 »

I eventually got the USB Flash drive to boot but I had to do it the old fashion way.

1. I deleted the existing partition
2. Created an Ext4 partition (formatted)
3. Installed GRUB manually (Expert mode)
4. Wrote directly to MBR on Flash drive
5. Modified Menu.lst to suit puppy version
6. Manually copied puppy files to Flash drive

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

grub4dosconfig procedure

#138 Post by shinobar »

smokey01 wrote:1. I deleted the existing partition
2. Created an Ext4 partition (formatted)
3. Installed GRUB manually (Expert mode)
4. Wrote directly to MBR on Flash drive
5. Modified Menu.lst to suit puppy version
6. Manually copied puppy files to Flash drive
Using grub4dosconfig:
1. Delete the existing partition
2 Create new partition table (Device >> Create Partition Table)
3. Create any filesystem partition (and format)
4. (Optionally) Make a directory for puppy files.
5. Manually copy puppy files to Flash drive
6. Run the grub4dosconfig GUI
Last edited by shinobar on Mon 22 Nov 2010, 14:20, edited 1 time 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

#139 Post by Stripe »

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

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

Re: the Bootflash and the Grub4DosCinfig.

#140 Post by shinobar »

shinobar wrote:i confirmed the Grub4DosCinfig v1.6.x corrupts USB flash treated with Bootflash USB-HDD type. Doesn't occur with the Grub4DosCinfig v1.5.x.
There maybe something incompatible with the partition table between the Bootflash and the Grub4DosCinfig. We need more investigation on this issue.
Thanks smokey01 for reportiong this issue.
The partition table written by Gparted:
# fdisk -l /dev/sdd
Disk /dev/sdd: 4043 MB, 4043309056 bytes
255 heads, 63 sectors/track, 491 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdd1 1 491 3943926 b W95 FAT32
The partition table written by BootFlash:
# fdisk -l /dev/sdd
Disk /dev/sdd: 4043 MB, 4043309056 bytes
255 heads, 32 sectors/track, 967 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes

Device Boot Start End Blocks Id System
/dev/sdd1 * 1 967 3945344 b W95 FAT32
The problem is, we can see, the track size of BootFlash is shorter than Gparted.... :cry:
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:

#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]

Post Reply