Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 01 Aug 2014, 02:02
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Grub4DosConfig
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 5 of 23 [333 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, ..., 21, 22, 23 Next
Author Message
shinobar


Joined: 28 May 2009
Posts: 2605
Location: Japan

PostPosted: Mon 08 Nov 2010, 01:31    Post subject: number of bytes  

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:
# 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:
    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?

_________________
Google Chrome portable
Downloads for Puppy Linux http://shino.pos.to/linux/downloads.html
Back to top
View user's profile Send private message Visit poster's website 
piratesmack


Joined: 16 Sep 2009
Posts: 100

PostPosted: Mon 08 Nov 2010, 02:33    Post subject: Re: number of bytes  

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:
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).

Quote:

What does the number 439(or 440 bytes) mean? Why not 446?


Wee's README.txt says:
Quote:

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)

Quote:

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:

# 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
Back to top
View user's profile Send private message 
shinobar


Joined: 28 May 2009
Posts: 2605
Location: Japan

PostPosted: Mon 08 Nov 2010, 03:09    Post subject: Re: number of bytes  

Hi, piratesmack.
I can release the next update of grub4dosconfig using your code soon.
Thanks for the nice lecture so quick!

_________________
Google Chrome portable
Downloads for Puppy Linux http://shino.pos.to/linux/downloads.html
Back to top
View user's profile Send private message Visit poster's website 
shinobar


Joined: 28 May 2009
Posts: 2605
Location: Japan

PostPosted: Mon 08 Nov 2010, 08:50    Post subject: grub4dos-0.4.4.v1.6.0  

THIS IS THE KILLER!
We need not grub legacy anymore Razz

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

_________________
Google Chrome portable
Downloads for Puppy Linux http://shino.pos.to/linux/downloads.html

Last edited by shinobar on Mon 08 Nov 2010, 09:32; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
nooby

Joined: 29 Jun 2008
Posts: 10557
Location: SwedenEurope

PostPosted: Mon 08 Nov 2010, 09:14    Post subject:  

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
Back to top
View user's profile Send private message 
shinobar


Joined: 28 May 2009
Posts: 2605
Location: Japan

PostPosted: Mon 08 Nov 2010, 09:27    Post subject: Make a rescue FD/USB  

@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

_________________
Google Chrome portable
Downloads for Puppy Linux http://shino.pos.to/linux/downloads.html
Back to top
View user's profile Send private message Visit poster's website 
piratesmack


Joined: 16 Sep 2009
Posts: 100

PostPosted: Mon 08 Nov 2010, 10:23    Post subject:  

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

Thanks Smile
Back to top
View user's profile Send private message 
shinobar


Joined: 28 May 2009
Posts: 2605
Location: Japan

PostPosted: Mon 08 Nov 2010, 10:26    Post subject: Great Thanks  

piratesmack wrote:
Thanks Smile

I need to express a great thanks to YOU, piratesmack Razz

_________________
Google Chrome portable
Downloads for Puppy Linux http://shino.pos.to/linux/downloads.html
Back to top
View user's profile Send private message Visit poster's website 
nooby

Joined: 29 Jun 2008
Posts: 10557
Location: SwedenEurope

PostPosted: Mon 08 Nov 2010, 10:39    Post subject:  

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
Back to top
View user's profile Send private message 
nooby

Joined: 29 Jun 2008
Posts: 10557
Location: SwedenEurope

PostPosted: Mon 08 Nov 2010, 11:30    Post subject:  

Just greg, your post disappeard. Smile
_________________
I use Google Search on Puppy Forum
not an ideal solution though
Back to top
View user's profile Send private message 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Mon 08 Nov 2010, 13:58    Post subject:  

Hey shinobar


how about a nice icon a handsome grub Laughing
grub.png
 Description   
 Filesize   10.69 KB
 Viewed   1491 Time(s)

grub.png

gnibbles.png
 Description   
 Filesize   11.83 KB
 Viewed   1425 Time(s)

gnibbles.png


_________________
debian wheezy ,linux mint, slackware I use them all and they all have good points
Mint would be best for general users though
Back to top
View user's profile Send private message 
noryb009

Joined: 20 Mar 2010
Posts: 538

PostPosted: Tue 09 Nov 2010, 17:21    Post subject:  

shinobar: Just making sure, but you DON'T need Dos/windows for grub4dos?
Back to top
View user's profile Send private message 
shinobar


Joined: 28 May 2009
Posts: 2605
Location: Japan

PostPosted: Tue 09 Nov 2010, 18:34    Post subject: Dos/windows required?  

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.

_________________
Google Chrome portable
Downloads for Puppy Linux http://shino.pos.to/linux/downloads.html
Back to top
View user's profile Send private message Visit poster's website 
noryb009

Joined: 20 Mar 2010
Posts: 538

PostPosted: Tue 09 Nov 2010, 18:43    Post subject:  

Thanks for clearing that up!
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 5012
Location: Charleston S.C. USA

PostPosted: Tue 09 Nov 2010, 19:00    Post subject:  

This is the best ever boot loader! Thanks.
I have totally stopped using old Grub.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 5 of 23 [333 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, ..., 21, 22, 23 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1154s ][ Queries: 13 (0.0314s) ][ GZIP on ]