Grub4DosConfig

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

number of bytes

#61 Post by shinobar »

piratesmack wrote:Wee is a little difficult to install, so I wrote a script that makes it easier.
Great thanks. And have some question.

Code: Select all

# Read disk signature and partition table from MBR_DEV
# and write it to wee63.mbr:
dd if=$MBR_DEV bs=1 skip=439 count=72 2>/dev/null | \
	dd of=/tmp/wee63.mbr bs=1 seek=439 conv=notrunc 2>/dev/null

# Back up the sectors about to be overwritten, just in case:
dd if=$MBR_DEV of=/root/$(basename $MBR_DEV).63s bs=512 count=63 2>/dev/null

# Write wee MBR to $MBR_DEV
dd if=/tmp/wee63.mbr of=$MBR_DEV 2>/dev/null
  1. Why we need to copy the disk signature and partition table?
    Doesn't the next work?

    Code: Select all

    dd if=/tmp/wee63.mbr of=$MBR_DEV bs=446 count=1
  2. What does the number 439(or 440 bytes) mean? Why not 446?
  3. Why the backup size is 512x63 bytes?
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

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

Re: number of bytes

#62 Post by piratesmack »

Hi, thank you for your interest
shinobar wrote: Why we need to copy the disk signature and partition table?
Doesn't the next work?

Code: Select all

dd if=/tmp/wee63.mbr of=$MBR_DEV bs=446 count=1
wee63.mbr is 63 sectors large (Actually a little less, but it can be a maximum of 63 sectors without overwriting data on the first partition). For comparison, the normal grub4dos boot code is only 18 sectors large, which isn't enough for Ext4 code.

You have to copy your disk signature and partition table to wee63.mbr, because you would lose them if you didn't (wee63.mbr would overwrite them).
What does the number 439(or 440 bytes) mean? Why not 446?
Wee's README.txt says:
First, read the Windows disk signature and partition information bytes
(72 bytes in total, from offset 0x01b8 to 0x01ff of the MBR sector), and
put them on the same range from offset 0x01b8 to 0x01ff of the beginning
sector of wee63.mbr.
If you convert 0x01b8 to decimal, you get 440
If you convert 0x01ff to decimal, you get 512

So the disk signature and partition table are located within bytes 440-512 (72 bytes total)
Why the backup size is 512x63 bytes?
I did that because wee63.mbr can be up to 63 sectors large.
1 sector = 512 bytes, so I backed up 512*63 bytes

I guess it would be better to check the exact size of wee63.mbr, and only back up that much.
Something like:

Code: Select all

# Back up the sectors about to be overwritten, just in case: 
BSIZE=$(stat -c "%s" /tmp/wee63.mbr)
dd if=$MBR_DEV of=/root/$(basename $MBR_DEV).63s bs=$BSIZE count=1

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

Re: number of bytes

#63 Post by shinobar »

Hi, piratesmack.
I can release the next update of grub4dosconfig using your code soon.
Thanks for the nice lecture so quick!
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:

grub4dos-0.4.4.v1.6.0

#64 Post by shinobar »

THIS IS THE KILLER!
We need not grub legacy anymore :P

The new version with features:
  • ext4 full support (Thanks to piratesmack)
    Supports ntfs, vfat, ext2, ext3, ext4 by standalone. Need not grub legacy anymore.
  • UUID for locating full installs
    Free from the drive order using the partition UUID for full installs.
  • Grub2 chain load
    Can chain to the coexisting grub2.
Try grub4dos-0.4.4.v1.6.0.pet, Download from here

Make a rescue FD/USB for the 1st try:
http://www.murga-linux.com/puppy/viewtopic.php?t=61348
Last edited by shinobar on Mon 08 Nov 2010, 13:32, edited 1 time in total.
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

#65 Post by nooby »

Shinobar,

that sure is great.

But being as clumsy persistent or even relentless newbie as I am


What will happen to my boot if I do that pet?

I bought an Acer Aspire one with win 7 starter on it. D250 the model.

I used Jolicloud version of Ubuntu 9.04? to make the changes to the boot up.

So the script of Wubi for Jolicloud rewrote what was need to get that thing going.

then I manually added puppy and other linux to the menu.lst deep down in Jolicound Directory.

So if I do the Pet you talk enthusiastically then that one ask me questions that I will have no way of knowing how to answer?


Sure I can start all over and add everything again from what that Pet do.

But that took me a year to accomplish and very very many questions on this board. To start all over will get a lot of members upset.

Hey Nooby we told you how to do that one year ago use the search.

But I can not use the search because me fail to know what search word to use. I know this from personal experience.
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:

Make a rescue FD/USB

#66 Post by shinobar »

@nooby
Make a rescue FD/USB for the 1st try. You can see what happens without risk.
http://www.murga-linux.com/puppy/viewtopic.php?t=61348
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

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

#67 Post by piratesmack »

Shinobar, I used your new Grub4dosconfig on my USB drive (vfat) and internal hard drive (Ext4). Both working fine.

Thanks :)

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

Great Thanks

#68 Post by shinobar »

piratesmack wrote:Thanks :)
I need to express a great thanks to YOU, piratesmack :P
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

#69 Post by nooby »

Shinobar, that maybe works. I have several 4GB USB flash memorys to use.

Can I save a current puppy luci-236 then on such a USB and then if the config mess up I boot up using the rescue usb and somehow repair it?

But I lose all the other puppies and such?

Maybe me can use another computer as a test machine but I am so lazy now.

Anyway keep it coming. You are a good contributer to puppy.


Edit

Hahahah, I am in Luci-236 now and it failed to boot three times despite me having both

safe mode debug

I had to add panic=300 for it to boot.

I used a backup pubsave to do an upgrade.

I should maybe test to only use pfix=ram and see if that always boot.
that way I will find out that it is the pupsave that makes it fail to boot.

It always fail at this part.

b43-pci-bridge
text text text
text ...

-

blinking cursor and the only way to get out of it is to do a hard reboot.

What is it hat makes it fail there and not on some other part and why does it help to add a lot of things to the kernel line?
I use Google Search on Puppy Forum
not an ideal solution though

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

#70 Post by nooby »

Just greg, your post disappeard. :)
I use Google Search on Puppy Forum
not an ideal solution though

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#71 Post by big_bass »

Hey shinobar


how about a nice icon a handsome grub :lol:
Attachments
grub.png
(10.69 KiB) Downloaded 3127 times
gnibbles.png
(11.83 KiB) Downloaded 3084 times

noryb009
Posts: 634
Joined: Sat 20 Mar 2010, 22:28

#72 Post by noryb009 »

shinobar: Just making sure, but you DON'T need Dos/windows for grub4dos?

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

Dos/windows required?

#73 Post by shinobar »

noryb009 wrote:shinobar: Just making sure, but you DON'T need Dos/windows for grub4dos?
Frequently asked.
The name '4dos' makes confusion.

grub4dos can manage Dos/Windows file systems, but also works without.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

noryb009
Posts: 634
Joined: Sat 20 Mar 2010, 22:28

#74 Post by noryb009 »

Thanks for clearing that up!

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#75 Post by bigpup »

This is the best ever boot loader! Thanks.
I have totally stopped using old Grub.

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#76 Post by sc0ttman »

I've just re-installed grub4dosconfig (1.6.0)

I love this tool, with frugal installer - now I finally have Puppy on (ext3) HD, using a frugal install.
Windows always made this a problem, until now. :D

Anyway.. about easy of use/usability...

I think the grub4dosconfig (and frugal installer) utility should use tooltips on the checkboxes, buttons etc in the GUI..
They are easy to add to gtkdialog GUIs and very important for novice users (and idiots like me).

Something like:

Code: Select all

# set tooltips
SEARCH_ONLY='search only this drive for puppy installs'
...
# build gui
'<checkbox tooltip-text="'$SEARCH_ONLY'">'
...
For example, a tooltip could say that the 'search only this drive' option "will not search for puppy installs on other drives"..
I thought this meant for MBRs... Even though the list above shows the MBRs that were found :roll:

Therefore, when I clicked 'search only this drive', the installer found no frugal installs, and therefore there was no Puppy entry in my menu.lst..

Not a problem for me luckily, as I realised my error and can fix it.. But tooltips would solve these kind of 'issue' for novices
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

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

Tool tips

#77 Post by shinobar »

sc0ttman wrote:about easy of use/usability...
Thanks for the suggestion.
Next version must be more user friendly with your feed back. > to all the readers.
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

#78 Post by nooby »

Shinobar,

may I ask about your program.

If I have Win7 Starter on my Acer D250 and Jolicloud has installed their Ubuntu style for small Netbooks on it using Wubi specially made for Jolicloud.

And I fire up your prog and try to install grub4Dos when there is already kind of grub with gldr there already.

What does the script do then? Does it rewrite so it make menu entries for all the Os that are already installed like win7Starter, Joliclound, Puppy Quirky, luci-236, Fluppy007, puppeee, wolf, murky, Puppy Studio and SuperOS ?

Or does it skip the win 7 or the jolicloud due to its wubi peculiar thing?

I mean can it create disaster that can not be repaired?

I have no DVD because it is a Netbook without DVD or CD.
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:

Wubi installed

#79 Post by shinobar »

nooby wrote:Does it rewrite so it make menu entries for all the Os that are already installed like win7Starter, Joliclound, Puppy Quirky, luci-236, Fluppy007, puppeee, wolf, murky, Puppy Studio and SuperOS ?
Hopfully all yes, but not tested. Calling for your test report.

Windows 7 Starter have not yet been tested. Hope the same as the regular Windows 7 as for the boot.
Hopefully the Grub4DosConfig detects Wubi installed distributions and place it on the top level menu.
If the Grub4DosConfig failed to list up them in the top level, you select 'Windows' there, then the next menu appears with Windows and Wubi listed on.

Test with Floppy is recommended, but for PC's without FDD, USB drives can.
http://www.murga-linux.com/puppy/viewtopic.php?t=61348
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

#80 Post by nooby »

Yes it is reasonable I make the rescue version first and see that it loads several times.

thanks.

Reason for that I ask is that I fail to use luci-236 and LupQ too but that for most of the time Quirky and pupeee and fluppy do boot. Dpup too boot.

SuperOS do boot.

So something about luci make it fail. Almost never fail if there is no pupsave in the sub dir but if it is a pupsave and if I do pfix=ram then it can still fail.

So I thought it can have to do with the older version of grub.
Jolicloud have their own version of grub so it can be different.

So if I use your version then luci should work too.
I use Google Search on Puppy Forum
not an ideal solution though

Post Reply