Re: ZFS on MBR does not boot at all

2013-05-12 Thread demelier . david
Le dimanche 5 mai 2013 22:20:43 Giorgos Keramidas a écrit :
 On Mon, 29 Apr 2013 13:29:18 +0200, David Demelier 
demelier.da...@gmail.com wrote:
  2013/4/18 David Demelier demelier.da...@gmail.com:
  Hello,
  I would like to use ZFS over MBR for multiboot purposes. I've followed
  that guide https://wiki.freebsd.org/RootOnZFS/ZFSBootPartition but it
  does not boot at all. The loader does not show up after choosing
  FreeBSD in the boot0 loader.
  
  The _ prompt appears but nothing starts. I've found many people over
  the web having the same problem but unfortunately no one found a
  solution.
  
  I think the offensive commands are ones with dd and zfsboot.
  Regards,
  
  So someone told me on IRC that the main problem was that I've put my
  partition swap as first partition in the FreeBSD slice and zfsboot
  *requires* that the zfs partition is the first.
  
  Can someone with right access to the wiki page may add a notice about
  this issue on https://wiki.freebsd.org/RootOnZFS/ZFSBootPartition
  please?
 
 Hi David,
 
 Thanks for following up with what the real problem was.  I updated the
 Wiki to include this:
 
 Note that partition order is important. It seems that zfsboot
 requires the freebsd-zfs partition to be the first, so make sure you
 add if first, before your swap partition.

Thank you :)

Regards,
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: ZFS on MBR does not boot at all

2013-05-09 Thread Giorgos Keramidas
On Sun, 05 May 2013 17:56:49 -0500, Joshua Isom jri...@gmail.com wrote:
 On 5/5/2013 3:20 PM, Giorgos Keramidas wrote:
 Hi David,

 Thanks for following up with what the real problem was.  I updated the
 Wiki to include this:

  Note that partition order is important. It seems that zfsboot
  requires the freebsd-zfs partition to be the first, so make sure you
  add if first, before your swap partition.

 Cheers,
 Giorgos

 What?  I've been using this set up for years.

 =   34  976773101  ada1  GPT  (465G)
  34128 1  freebsd-boot  (64k)
 1628388608 2  freebsd-swap  (4.0G)
 8388770  968384365 3  freebsd-zfs  (461G)

 =   34  976773101  ada2  GPT  (465G)
  34128 1  freebsd-boot  (64k)
 1628388608 2  freebsd-swap  (4.0G)
 8388770  968384365 3  freebsd-zfs  (461G)

That's ok for GPT partitions.  The original post was about an MBR
partition table.

Some modern laptops (mine is one) do not boot successfully from a disk
with a GPT partition scheme, unless the boot loader is EFI-capable
(which ours isn't).  So you have to use an MBR-style partition table.

In those cases the note is still useful to see.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: ZFS on MBR does not boot at all

2013-05-09 Thread uki
I had to set up ZFS on MBR lately.
Since I'm lazy I wrote a script for that.
Maybe it would suit your needs (it's very simple though).
https://bitbucket.org/ukaszg/freebsd-zfs-on-mbr-installer


2013/5/9 Giorgos Keramidas keram...@ceid.upatras.gr:
 On Sun, 05 May 2013 17:56:49 -0500, Joshua Isom jri...@gmail.com wrote:
 On 5/5/2013 3:20 PM, Giorgos Keramidas wrote:
 Hi David,

 Thanks for following up with what the real problem was.  I updated the
 Wiki to include this:

  Note that partition order is important. It seems that zfsboot
  requires the freebsd-zfs partition to be the first, so make sure you
  add if first, before your swap partition.

 Cheers,
 Giorgos

 What?  I've been using this set up for years.

 =   34  976773101  ada1  GPT  (465G)
  34128 1  freebsd-boot  (64k)
 1628388608 2  freebsd-swap  (4.0G)
 8388770  968384365 3  freebsd-zfs  (461G)

 =   34  976773101  ada2  GPT  (465G)
  34128 1  freebsd-boot  (64k)
 1628388608 2  freebsd-swap  (4.0G)
 8388770  968384365 3  freebsd-zfs  (461G)

 That's ok for GPT partitions.  The original post was about an MBR
 partition table.

 Some modern laptops (mine is one) do not boot successfully from a disk
 with a GPT partition scheme, unless the boot loader is EFI-capable
 (which ours isn't).  So you have to use an MBR-style partition table.

 In those cases the note is still useful to see.


 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org



-- 
Pozdrawiam,
Łukasz Gruner
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

Re: ZFS on MBR does not boot at all

2013-05-05 Thread Giorgos Keramidas
On Mon, 29 Apr 2013 13:29:18 +0200, David Demelier demelier.da...@gmail.com 
wrote:
 2013/4/18 David Demelier demelier.da...@gmail.com:
 Hello,
 I would like to use ZFS over MBR for multiboot purposes. I've followed
 that guide https://wiki.freebsd.org/RootOnZFS/ZFSBootPartition but it
 does not boot at all. The loader does not show up after choosing
 FreeBSD in the boot0 loader.

 The _ prompt appears but nothing starts. I've found many people over
 the web having the same problem but unfortunately no one found a
 solution.

 I think the offensive commands are ones with dd and zfsboot.
 Regards,

 So someone told me on IRC that the main problem was that I've put my
 partition swap as first partition in the FreeBSD slice and zfsboot
 *requires* that the zfs partition is the first.

 Can someone with right access to the wiki page may add a notice about
 this issue on https://wiki.freebsd.org/RootOnZFS/ZFSBootPartition
 please?

Hi David,

Thanks for following up with what the real problem was.  I updated the
Wiki to include this:

Note that partition order is important. It seems that zfsboot
requires the freebsd-zfs partition to be the first, so make sure you
add if first, before your swap partition.

Cheers,
Giorgos



pgpAGlS_lM5GA.pgp
Description: PGP signature


Re: ZFS on MBR does not boot at all

2013-05-05 Thread Joshua Isom

On 5/5/2013 3:20 PM, Giorgos Keramidas wrote:

Hi David,

Thanks for following up with what the real problem was.  I updated the
Wiki to include this:

 Note that partition order is important. It seems that zfsboot
 requires the freebsd-zfs partition to be the first, so make sure you
 add if first, before your swap partition.

Cheers,
Giorgos



What?  I've been using this set up for years.

=   34  976773101  ada1  GPT  (465G)
 34128 1  freebsd-boot  (64k)
1628388608 2  freebsd-swap  (4.0G)
8388770  968384365 3  freebsd-zfs  (461G)

=   34  976773101  ada2  GPT  (465G)
 34128 1  freebsd-boot  (64k)
1628388608 2  freebsd-swap  (4.0G)
8388770  968384365 3  freebsd-zfs  (461G)


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: ZFS on MBR does not boot at all

2013-04-29 Thread David Demelier
2013/4/18 David Demelier demelier.da...@gmail.com:
 Hello,

 I would like to use ZFS over MBR for multiboot purposes. I've followed
 that guide https://wiki.freebsd.org/RootOnZFS/ZFSBootPartition but it
 does not boot at all. The loader does not show up after choosing
 FreeBSD in the boot0 loader.

 The _ prompt appears but nothing starts. I've found many people over
 the web having the same problem but unfortunately no one found a
 solution.

 I think the offensive commands are ones with dd and zfsboot.

 Regards,


So someone told me on IRC that the main problem was that I've put my
partition swap as first partition in the FreeBSD slice and zfsboot
*requires* that the zfs partition is the first.

Can someone with right access to the wiki page may add a notice about
this issue on https://wiki.freebsd.org/RootOnZFS/ZFSBootPartition
please?

Regards,

--
Demelier David
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


ZFS on MBR does not boot at all

2013-04-18 Thread David Demelier
Hello,

I would like to use ZFS over MBR for multiboot purposes. I've followed
that guide https://wiki.freebsd.org/RootOnZFS/ZFSBootPartition but it
does not boot at all. The loader does not show up after choosing
FreeBSD in the boot0 loader.

The _ prompt appears but nothing starts. I've found many people over
the web having the same problem but unfortunately no one found a
solution.

I think the offensive commands are ones with dd and zfsboot.

Regards,

--
Demelier David
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Using bsdinstall to create MBR

2013-03-12 Thread Doug Hardie
I am trying to use bsdinstall to create a MBR partitioned disk.  I can set the 
partition type to MBR fine.  However, when trying to add in slices I can't 
figure out what to enter for the parameters.  Everything I have tried gives an 
error message.  I wanted one for / and one for swap.  How do I create the two 
slices?

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Using bsdinstall to create MBR

2013-03-12 Thread Polytropon
On Tue, 12 Mar 2013 18:36:15 -0700, Doug Hardie wrote:
 I am trying to use bsdinstall to create a MBR partitioned disk. 
 I can set the partition type to MBR fine.  However, when trying
 to add in slices I can't figure out what to enter for the parameters.
 Everything I have tried gives an error message.  I wanted one for /
 and one for swap.  How do I create the two slices?

In what step of 2.7.2 (Manual Partitioning) do you experience
problems? Can you provide the text of the error message?

http://www.freebsd.org/doc/handbook/bsdinstall-partitioning.html

This chapter covers GPT and MBR partitioning with the new
bsdinstall program.

If you don't have success using the installer, just try to use
the command line's default tools. With gpart you can create
GPT and MBR partitioning, but you can also use the old-fashioned
tools like fdisk and disklabel / bsdlabel. You should be able to
access them via the shell.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Using bsdinstall to create MBR

2013-03-12 Thread Warren Block

On Tue, 12 Mar 2013, Doug Hardie wrote:

I am trying to use bsdinstall to create a MBR partitioned disk.  I can 
set the partition type to MBR fine.  However, when trying to add in 
slices I can't figure out what to enter for the parameters. 
Everything I have tried gives an error message.  I wanted one for / 
and one for swap.  How do I create the two slices?


http://forums.freebsd.org/showpost.php?p=149210postcount=13
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Using bsdinstall to create MBR

2013-03-12 Thread Erich Dollansky
Hi,

On Tue, 12 Mar 2013 18:36:15 -0700
Doug Hardie bc...@lafn.org wrote:

 I am trying to use bsdinstall to create a MBR partitioned disk.  I
 can set the partition type to MBR fine.  However, when trying to add
 in slices I can't figure out what to enter for the parameters.
 Everything I have tried gives an error message.  I wanted one for /
 and one for swap.  How do I create the two slices?
 
I would recommend gpart. You can find out more here:

http://www.wonkity.com/~wblock/docs/html/disksetup.html

Erich
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
 freebsd-questions-unsubscr...@freebsd.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Using bsdinstall to create MBR

2013-03-12 Thread Doug Hardie

On 12 March 2013, at 18:50, Warren Block wbl...@wonkity.com wrote:

 On Tue, 12 Mar 2013, Doug Hardie wrote:
 
 I am trying to use bsdinstall to create a MBR partitioned disk.  I can set 
 the partition type to MBR fine.  However, when trying to add in slices I 
 can't figure out what to enter for the parameters. Everything I have tried 
 gives an error message.  I wanted one for / and one for swap.  How do I 
 create the two slices?
 
 http://forums.freebsd.org/showpost.php?p=149210postcount=13
 

Thank you .  That shows the correct procedure.  I never would have guessed 
that.  It works just fine.  This needs to be included in the handbook.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


gpart and mbr give no operating system message at boot.

2012-09-07 Thread markham breitbach
I am trying to partition a disk to be used as the primary boot disk for a 
FreeBSD 8.3
installation using gpart to install an MBR partition.

The system is an existing FreeBSD 5.2.1 system at a remote location (ie 
impossible to boot
from CD/netboot/etc), but has no data of value.  To do this I am copying /boot 
and
mfsroot.gz from an mfsbsd iso image to boot to an MFS live system so I can wipe 
the drive
and do a clean install of 8.3.  After booting to the MFS I do this:

dd if=/dev/zero of=/dev/ad2 bs=1m count=1
gpart create -s mbr ad2
gpart add -b63 -t freebsd ad2
gpart create -s bsd ad2s1
gpart add -i1 -s 1g -t freebsd-ufs ad2s1
gpart add -i2 -s 1g -t freebsd-swap ad2s1
gpart add -i4 -s 2g -t freebsd-ufs ad2s1
gpart add -i5 -s 1g -t freebsd-ufs ad2s1
gpart add -i6 -t freebsd-ufs ad2s1
gpart set -a active -i 1 ad2
gpart bootcode -b /boot/mbr ad2
newfs /dev/ad2s1a
newfs -U /dev/ad2s1d
newfs -U /dev/ad2s1e
newfs -U /dev/ad2s1f

followed by a sysinstall and some configuration.  When I reboot I get a message 
that says
Operating system not found and the system hangs.

If I follow the same procedure but create a gpt partition it works swimmingly.  
I am OK
with using a gpt partition if needed, but for the sake of curiosity I would 
like to know
why I can't make the MBR partition partition work.  Am I missing something?


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: gpart and mbr give no operating system message at boot.

2012-09-07 Thread Warren Block

On Fri, 7 Sep 2012, markham breitbach wrote:


I am trying to partition a disk to be used as the primary boot disk for a 
FreeBSD 8.3
installation using gpart to install an MBR partition.

The system is an existing FreeBSD 5.2.1 system at a remote location (ie 
impossible to boot
from CD/netboot/etc), but has no data of value.  To do this I am copying /boot 
and
mfsroot.gz from an mfsbsd iso image to boot to an MFS live system so I can wipe 
the drive
and do a clean install of 8.3.  After booting to the MFS I do this:

dd if=/dev/zero of=/dev/ad2 bs=1m count=1
gpart create -s mbr ad2
gpart add -b63 -t freebsd ad2
gpart create -s bsd ad2s1
gpart add -i1 -s 1g -t freebsd-ufs ad2s1
gpart add -i2 -s 1g -t freebsd-swap ad2s1
gpart add -i4 -s 2g -t freebsd-ufs ad2s1
gpart add -i5 -s 1g -t freebsd-ufs ad2s1
gpart add -i6 -t freebsd-ufs ad2s1
gpart set -a active -i 1 ad2
gpart bootcode -b /boot/mbr ad2
newfs /dev/ad2s1a
newfs -U /dev/ad2s1d
newfs -U /dev/ad2s1e
newfs -U /dev/ad2s1f

followed by a sysinstall and some configuration.  When I reboot I get a message 
that says
Operating system not found and the system hangs.

If I follow the same procedure but create a gpt partition it works swimmingly.  
I am OK
with using a gpt partition if needed, but for the sake of curiosity I would 
like to know
why I can't make the MBR partition partition work.  Am I missing something?


Need to install bootcode to the slice also:

# gpart bootcode -b /boot/boot ad2s1

Why are you skipping partition 3?  For that matter, don't give partition 
numbers when adding, and gpart will just use the next available.


If GPT works, there is little reason to use MBR.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: gpart and mbr give no operating system message at boot.

2012-09-07 Thread markham breitbach
Thanks Warren!

I was always under the impression that partition 3 was not to be touched as the 
raw
partition, so figured it was best left alone.
I was mostly concerned with installing MBR so it would still be compatible with
sysinstall, although I can't really think of a terribly good reason not to go 
GPT.
Installing the bootcode gets me a step closer, but is now puking at the loader. 
I'm not
sure if this is because the bootcode is coming from and 8.1 install, but at 
this point I'm
pretty much out of time and out of patience for this, since it is something of 
a bandaid
situation anyway.


On 12-09-07 2:48 PM, Warren Block wrote:
 On Fri, 7 Sep 2012, markham breitbach wrote:

 I am trying to partition a disk to be used as the primary boot disk for a 
 FreeBSD 8.3
 installation using gpart to install an MBR partition.

 The system is an existing FreeBSD 5.2.1 system at a remote location (ie 
 impossible to boot
 from CD/netboot/etc), but has no data of value. To do this I am copying 
 /boot and
 mfsroot.gz from an mfsbsd iso image to boot to an MFS live system so I can 
 wipe the drive
 and do a clean install of 8.3. After booting to the MFS I do this:

 dd if=/dev/zero of=/dev/ad2 bs=1m count=1
 gpart create -s mbr ad2
 gpart add -b63 -t freebsd ad2
 gpart create -s bsd ad2s1
 gpart add -i1 -s 1g -t freebsd-ufs ad2s1
 gpart add -i2 -s 1g -t freebsd-swap ad2s1
 gpart add -i4 -s 2g -t freebsd-ufs ad2s1
 gpart add -i5 -s 1g -t freebsd-ufs ad2s1
 gpart add -i6 -t freebsd-ufs ad2s1
 gpart set -a active -i 1 ad2
 gpart bootcode -b /boot/mbr ad2
 newfs /dev/ad2s1a
 newfs -U /dev/ad2s1d
 newfs -U /dev/ad2s1e
 newfs -U /dev/ad2s1f

 followed by a sysinstall and some configuration. When I reboot I get a 
 message that says
 Operating system not found and the system hangs.

 If I follow the same procedure but create a gpt partition it works 
 swimmingly. I am OK
 with using a gpt partition if needed, but for the sake of curiosity I would 
 like to know
 why I can't make the MBR partition partition work. Am I missing something?

 Need to install bootcode to the slice also:

 # gpart bootcode -b /boot/boot ad2s1

 Why are you skipping partition 3? For that matter, don't give partition 
 numbers when
 adding, and gpart will just use the next available.

 If GPT works, there is little reason to use MBR.
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: gpart and mbr give no operating system message at boot.

2012-09-07 Thread Polytropon
On Fri, 07 Sep 2012 17:00:24 -0600, markham breitbach wrote:
 I was always under the impression that partition 3 was not to be touched as 
 the raw
 partition, so figured it was best left alone.

No, that is regarding traditional partitioning. But it's
not the 3rd partition, it's the 'c' partition, which means
nothing more or less than the whole device or the whole
slice. In today's FreeBSD /dev representation, the 'c' is
left out, e. g. /dev/ad0c = /dev/ad0, and /dev/da3s2c = /dev/da3s2.
For GPT partitions, that doesn't matter. It's only relevant
for the kind of partitions disklabel (bsdlabel) creates
inside a slice or directly on the device.

Reserved names (or those with special purpose) are 'a'
for a bootable partition, 'b' for a swap partition and
'c' for the whole slice or disk. I think even 'd' has
had a special meaning, but I didn't encounter it yet,
even though I'm using FreeBSD since 4.0. :-)

Partitions created with the gpart / gpt tools usually use
e. g. /dev/ad0p1 and so on for partitioning, if I remember
correctly. Additionally, I typically point to

http://www.wonkity.com/~wblock/docs/html/disksetup.html

to encourage the use of labels, because that lets you leave
devices names alone.

More information can be found here:

http://www.daemonforums.org/showthread.php?t=2666

http://www.freebsdonline.com/content/view/731/506/

http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html

And also

http://www.freebsd.org/doc/handbook/geom-glabel.html

regarding labels (GEOM labels, UFS labels, UFSIDs).



 I was mostly concerned with installing MBR so it would still be compatible 
 with
 sysinstall, although I can't really think of a terribly good reason not to go 
 GPT.

Maybe that is significant only on older hardware where you
intendedly want to preserve the traditional approach of
MBR partitioning, maybe to keep compatibility with other
systems that have trouble with GPT layouts.



 Installing the bootcode gets me a step closer, but is now puking at the 
 loader. I'm not
 sure if this is because the bootcode is coming from and 8.1 install, but at 
 this point I'm
 pretty much out of time and out of patience for this, since it is something 
 of a bandaid
 situation anyway.

The version number should not be the problem. It's only important
that the boot elements installed refer to the layout that is
present on disk correctly.




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Force disk with old GPT label to be recognized as MBR one

2012-08-30 Thread Виталий Туровец
Hello there, people!
I have a FreeBSD box with 9.1-RC3 i386 and an interesting HDD.
It was patitioned with GPT and zfs some (long) time ago. After that
the hdd has been completely repartitioned with MBR scheme and one
single freebsd (165) partition and one slice there. It worked fine in
7.2, but now i have to get the data from that slice and when i connect
the hdd to 9.1 box, it finds old corrupt GPT label (i suppose, it's
backup GPT header somewhere in the end of actual disk) and does not
recognize the MBR scheme there.
It sees no freebsd partitions (and one exists there, for sure :) ). So
my question is: how do i force the system to ignore old corrupt GPT
header on this hdd, or how do i remove the header, or is there any
workaround possible?
This is what gpart says about this disk:
[11:54][border][~] # gpart show ada1
=34  1250263661  ada1  GPT  (596G) [CORRUPT]
  34 256 1  freebsd-boot  (128k)
 290   838860800 2  freebsd-zfs  (400G)
   838861090   411402605- free -  (196G)

And this is what fdisk says:
[11:54][border][~] # fdisk ada1
*** Working on device /dev/ada1 ***
parameters extracted from in-core disklabel are:
cylinders=1240341 heads=16 sectors/track=63 (1008 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=1240341 heads=16 sectors/track=63 (1008 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 63, size 1250258562 (610477 Meg), flag 80 (active)
beg: cyl 0/ head 1/ sector 1;
end: cyl 1023/ head 14/ sector 63
The data for partition 2 is:
UNUSED
The data for partition 3 is:
UNUSED
The data for partition 4 is:
UNUSED

So fdisk sees everything fine.
Thank you a lot guys!

-- 




~~~
WBR,
Vitaliy Turovets
Systems Administrator
Corebug.Net
+38(093)265-70-55
VITU-RIPE
X-NCC-RegID: ua.tv
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Force disk with old GPT label to be recognized as MBR one

2012-08-30 Thread Michael Sierchio
On Thu, Aug 30, 2012 at 1:54 AM, Виталий Туровец core...@corebug.net wrote:

 So
 my question is: how do i force the system to ignore old corrupt GPT
 header on this hdd, or how do i remove the header, or is there any
 workaround possible?

dd if=/dev/zero of=/dev/ada1 bs=64k
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Force disk with old GPT label to be recognized as MBR one

2012-08-30 Thread Виталий Туровец
2012/8/30 Michael Sierchio ku...@tenebras.com:
 On Thu, Aug 30, 2012 at 1:54 AM, Виталий Туровец core...@corebug.net wrote:

 So
 my question is: how do i force the system to ignore old corrupt GPT
 header on this hdd, or how do i remove the header, or is there any
 workaround possible?

 dd if=/dev/zero of=/dev/ada1 bs=64k

Well, i thought that my need to get files from hdd is  easy enough to
understand from my original message:)

-- 




~~~
WBR,
Vitaliy Turovets
Systems Administrator
Corebug.Net
+38(093)265-70-55
VITU-RIPE
X-NCC-RegID: ua.tv
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Force disk with old GPT label to be recognized as MBR one

2012-08-30 Thread Michael Sierchio
On Thu, Aug 30, 2012 at 4:18 AM, Виталий Туровец core...@corebug.net wrote:

 Well, i thought that my need to get files from hdd is  easy enough to
 understand from my original message:)

Извините, пожалуйста!
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Force disk with old GPT label to be recognized as MBR one

2012-08-30 Thread Warren Block

On Thu, 30 Aug 2012, ??? ??? wrote:


Hello there, people!
I have a FreeBSD box with 9.1-RC3 i386 and an interesting HDD.
It was patitioned with GPT and zfs some (long) time ago. After that
the hdd has been completely repartitioned with MBR scheme and one
single freebsd (165) partition and one slice there. It worked fine in
7.2, but now i have to get the data from that slice and when i connect
the hdd to 9.1 box, it finds old corrupt GPT label (i suppose, it's
backup GPT header somewhere in the end of actual disk) and does not
recognize the MBR scheme there.


In case it has not been said: make a full backup of everything on that 
disk first using dd.


Erasing the last 34 blocks or 17048 bytes of the disk will erase the 
backup GPT.  It may be enough to erase just the very last block.


  # diskinfo -v /dev/ada1
  /dev/ada1
512 # sectorsize
256060514304# mediasize in bytes (238G)
500118192   # mediasize in sectors

  # : Not tested, could be off by one!
  # dd if=/dev/zero of=/dev/ada1 bs=512 seek=500118191

Force a retaste with 'true  /dev/ada1', then see what gpart shows.  If 
the drive is still seen as GPT, adjust the seek to begin at (mediasize 
in sectors) - 34.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Force disk with old GPT label to be recognized as MBR one

2012-08-30 Thread Виталий Туровец
2012/8/30 Warren Block wbl...@wonkity.com:
 On Thu, 30 Aug 2012, ??? ??? wrote:

 Hello there, people!
 I have a FreeBSD box with 9.1-RC3 i386 and an interesting HDD.
 It was patitioned with GPT and zfs some (long) time ago. After that
 the hdd has been completely repartitioned with MBR scheme and one
 single freebsd (165) partition and one slice there. It worked fine in
 7.2, but now i have to get the data from that slice and when i connect
 the hdd to 9.1 box, it finds old corrupt GPT label (i suppose, it's
 backup GPT header somewhere in the end of actual disk) and does not
 recognize the MBR scheme there.


 In case it has not been said: make a full backup of everything on that disk
 first using dd.

 Erasing the last 34 blocks or 17048 bytes of the disk will erase the backup
 GPT.  It may be enough to erase just the very last block.

   # diskinfo -v /dev/ada1
   /dev/ada1
 512 # sectorsize
 256060514304# mediasize in bytes (238G)
 500118192   # mediasize in sectors

   # : Not tested, could be off by one!
   # dd if=/dev/zero of=/dev/ada1 bs=512 seek=500118191

 Force a retaste with 'true  /dev/ada1', then see what gpart shows.  If the
 drive is still seen as GPT, adjust the seek to begin at (mediasize in
 sectors) - 34.

Thank you a lot! It worked like a charm!

-- 




~~~
WBR,
Vitaliy Turovets
Systems Administrator
Corebug.Net
+38(093)265-70-55
VITU-RIPE
X-NCC-RegID: ua.tv
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Dual Booting Linux with FreeBSD 9.0 - Grub in MBR

2012-01-28 Thread Bas Smeelen
On Fri, 27 Jan 2012 21:32:10 +
Kaya Saman kayasa...@gmail.com wrote:

 Hi,
 
 am just wondering if anyone has successfully managed to boot FreeBSD
 9.0 and Linux.
 
 I run Fedora 16 x64 with Grub installed in my MBR.
 
 FBSD9 installed as the new disk scheme GPT. I think (I manually 
 partitioned as my disk is quite crowded).
 
 Anyway I found this:
 
 http://lists.freebsd.org/pipermail/freebsd-questions/2011-October/234858.html
 
 and at the moment I have this in my Grub config:
 
 menuentry 'FreeBSD 9.0'  {
  set root=(ada0,1,a)
  kfreebsd /boot/loader
  boot
 }
 
 But unfortunately no boot :-(
 
 
 I have tried using (hd0,0), (hd0,1,a), (hd0,0,a), and (hd0,a) but 
 unfortunately nothing is working.
 
 
 The Grub version is 2.
 
 
 Can anyone help me?
 

Hi

I have the following partition layout
P1 linux swap
P2 FreeBSD 
P3 linux
P4 extended which holds 2 more linux partitions

FreeBSD 9 installed on P2 and the FreeBSD bootloader on P2

In /etc/grub.d/40_custom I have put the following:

menuentry FreeBSD {
 set root=(hd0,2)
 chainloader +1
 }

Then run update-grub as root.

The (hd0,2) entry means first harddisk (this laptop only has one) and
the second partition, which holds the FreeBSD bootloader that gets
loaded with the enry chainloader +1.

This works for me. Hope it helps.

I think with the way you have the setup now, a module must be loaded
first in the grub config. Insmod ufs or similair.


Disclaimer: http://www.ose.nl/email

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Dual Booting Linux with FreeBSD 9.0 - Grub in MBR

2012-01-28 Thread Kaya Saman

On 01/28/2012 08:54 AM, Bas Smeelen wrote:

On Fri, 27 Jan 2012 21:32:10 +
Kaya Samankayasa...@gmail.com  wrote:


Hi,

am just wondering if anyone has successfully managed to boot FreeBSD
9.0 and Linux.

I run Fedora 16 x64 with Grub installed in my MBR.

FBSD9 installed as the new disk scheme GPT. I think (I manually
partitioned as my disk is quite crowded).

Anyway I found this:

http://lists.freebsd.org/pipermail/freebsd-questions/2011-October/234858.html

and at the moment I have this in my Grub config:

menuentry 'FreeBSD 9.0'  {
  set root=(ada0,1,a)
  kfreebsd /boot/loader
  boot
}

But unfortunately no boot :-(


I have tried using (hd0,0), (hd0,1,a), (hd0,0,a), and (hd0,a) but
unfortunately nothing is working.


The Grub version is 2.


Can anyone help me?


Hi

I have the following partition layout
P1 linux swap
P2 FreeBSD
P3 linux
P4 extended which holds 2 more linux partitions

FreeBSD 9 installed on P2 and the FreeBSD bootloader on P2

In /etc/grub.d/40_custom I have put the following:

menuentry FreeBSD {
  set root=(hd0,2)
  chainloader +1
  }

Then run update-grub as root.

The (hd0,2) entry means first harddisk (this laptop only has one) and
the second partition, which holds the FreeBSD bootloader that gets
loaded with the enry chainloader +1.

This works for me. Hope it helps.

I think with the way you have the setup now, a module must be loaded
first in the grub config. Insmod ufs or similair.


Disclaimer: http://www.ose.nl/email


Thanks for the response!!

Actually I got this working but eventually was up for nearly 24 hours 
which meant I was too tired to post back here :-)



My Grub is just weird! Which is why I couldn't work things out. For 
anyone running Fedora 16 or alike this may help; I have this partition 
layout:


1. FreeBSD UFS2
4. Extended Partition
5. Linux / Ext4
2 Linux Swap
3 Linux JFS


Don't ask why 4,5 partitions but Fedora installer took over and left me 
with no control otherwise Fedora should have been on 2.



Now the Grub entry is as follows:


menuentry 'FreeBSD 9.0'  {
insmod part_msdos
set root='(hd0,msdos1)'
chainloader +1
}


I have no idea why my version of grub is sooo different from everyone 
elses as finding many dualboot bsd/linux combos with Grub entries being 
more like yours, Bas, this is certainly puzzling.



Anyhow the situation is solved :-)



Regards,


Kaya
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Dual Booting Linux with FreeBSD 9.0 - Grub in MBR

2012-01-27 Thread Kaya Saman

Hi,

am just wondering if anyone has successfully managed to boot FreeBSD 9.0 
and Linux.


I run Fedora 16 x64 with Grub installed in my MBR.

FBSD9 installed as the new disk scheme GPT. I think (I manually 
partitioned as my disk is quite crowded).


Anyway I found this:

http://lists.freebsd.org/pipermail/freebsd-questions/2011-October/234858.html

and at the moment I have this in my Grub config:

menuentry 'FreeBSD 9.0'  {
set root=(ada0,1,a)
kfreebsd /boot/loader
boot
}

But unfortunately no boot :-(


I have tried using (hd0,0), (hd0,1,a), (hd0,0,a), and (hd0,a) but 
unfortunately nothing is working.



The Grub version is 2.


Can anyone help me?


Thanks


Kaya
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: 9.0 and bsdinstall - avoiding updating the MBR

2011-11-21 Thread Ian Smith
In freebsd-questions Digest, Vol 390, Issue 1, Message: 18
On Mon, 21 Nov 2011 01:47:27 + Bruce Cran br...@cran.org.uk wrote:
  I'm planning to install FreeBSD alongside a whole range of Windows 
  builds for testing. In 8.x it's possible to tell the installer not to 
  bother updating the MBR so you can use something like EasyBCD to boot it 
  via the Windows bootloader instead. Is it still possible on 9.0-RC2 
  using bsdinstall? I don't seem to remember seeing any option to avoid 
  writing out the new boot code.

Hi, I gather not (yet?)  Can save the MBR with (eg) 'boot0cfg -f ~/mymbr 
adaX' for safety, dd it back if need be, and/or use fdisk(8) -p, -t and 
-f flags to save, test and restore just the slice table.

At least they're precautions I'm taking, really not wanting to clobber 
win2k (for BIOS updates :), 8.2-RELEASE or a shared UFS partition when 
next trying to install 9.0-RC2 to slice 2, currently 7.4-RELEASE ..

% boot0cfg -v ad0
#   flag start chs   type   end chs   offset size
1   0x00  0:  1: 1   0x0b   1023:  5:63   63  8385867
2   0x00   1023:255:63   0xa5   1023: 13:63  8385930125821080
3   0x00   1023:255:63   0xa5   1023: 15:63134207010 33543342
4   0x80   1023:255:63   0xa5   1023: 14:63167750730 66685815

version=2.0  drive=0x80  mask=0xf  ticks=182  bell=# (0x23)
options=packet,update,nosetdrv
volume serial ID a8a8-a8a8
default_selection=F4 (Slice 4)

% fdisk -p ad0
# /dev/ad0
g c232581 h16 s63
p 1 0x0b 63 8385867
p 2 0xa5 8385930 125821080
p 3 0xa5 134207010 33543342
p 4 0xa5 167750730 66685815
a 4

cheers, Ian
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


9.0 and bsdinstall - avoiding updating the MBR

2011-11-20 Thread Bruce Cran
I'm planning to install FreeBSD alongside a whole range of Windows 
builds for testing. In 8.x it's possible to tell the installer not to 
bother updating the MBR so you can use something like EasyBCD to boot it 
via the Windows bootloader instead. Is it still possible on 9.0-RC2 
using bsdinstall? I don't seem to remember seeing any option to avoid 
writing out the new boot code.


--
Bruce Cran
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re-create MBR

2011-09-05 Thread Graham Bentley
Hi All,

I had to install Linux to participate in a project I was involved with.
Now is all finished I have restored the partition but now
need a 3bsd boot sector back. Scheme is ;

0 Primary XP
0 Extended FAT32
1 Primary FreeBSD

Approx 1/3 disc for each. How can I restore the 3bsd
boot sector?

Thanks!
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Re-create MBR

2011-09-05 Thread Polytropon
On Mon, 5 Sep 2011 13:26:38 +0100, Graham Bentley wrote:
 Hi All,
 
 I had to install Linux to participate in a project I was involved with.
 Now is all finished I have restored the partition but now
 need a 3bsd boot sector back. Scheme is ;
 
 0 Primary XP
 0 Extended FAT32
 1 Primary FreeBSD
 
 Approx 1/3 disc for each. How can I restore the 3bsd
 boot sector?

See man fdisk. In your case - depending on device names
you are currently using - something _like this_ should do
the trick:

# fdisk -B /dev/ad0s2

I think you can also use the sysinstall Partition screen
to update the boot sector (make no change to the slice
listing, maybe mark the FreeBSD slice as active, then
exit the screen and choose either standard MBR or the
boot manager depending on your requirements).

As I'm not a multi-boot person, I can't be more specific,
sorry.


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Re-create MBR

2011-09-05 Thread Warren Block

On Mon, 5 Sep 2011, Graham Bentley wrote:


I had to install Linux to participate in a project I was involved with.
Now is all finished I have restored the partition but now
need a 3bsd boot sector back. Scheme is ;

0 Primary XP
0 Extended FAT32
1 Primary FreeBSD

Approx 1/3 disc for each. How can I restore the 3bsd
boot sector?


If you mean the FreeBSD boot0 multi-boot loader, see boot0cfg(8).  It 
can be run from a live CD like mfsBSD (http://mfsbsd.vx.sk/).

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Making an mbr boot usb on 8.2-stable

2011-07-03 Thread Joshua Isom
I recently changed my raid0 into two raid1's so I can have redundancy. 
Getting a disk to boot was harder than I ever remember.  Part of the 
problem, my gigabyte bios locks up hard if there's a gpt usb drive 
plugged in, not even scanning the memory.  It seems to be a little known 
problem.  Some of the stuff I read on the internet mentions fdisk being 
somewhat broken because of geom changes, and I couldn't get a usb disk 
to boot that I made with fdisk or gpart.  I ended up just dd'ing a 
memstick image from freebsd.org onto a drive and booting that. 
Annoyingly, the only one supporting zfs v28 is the 9-current image 
judging by the timestamps.


I'm still wanting a rescue disk, and gpt is out of the question.  I 
don't want a cd because I want a full install and to be able to 
periodically update it.  I can partition the drive, install freebsd on 
it, but it won't boot.  I've tried gpart, fdisk, and sade but I can't 
seem to be able to make it actually boot or even reach loader.  I think 
the furthest I got was boot1.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: ROOT on ZFS with MBR partitions

2011-02-27 Thread Gautham Ganapathy
On Sun, Feb 27, 2011 at 12:45 AM, Daniel Staal dst...@usa.net wrote:
 --As of February 27, 2011 12:26:04 AM +, Slawomir Wojtczak is alleged to
 have said:

 ... but none of them seems to work, after installation it hangs at boot
 like that: http://ompldr.org/vN2tscQ

 --As for the rest, it is mine.

 Hmm.  Interesting.  I'm having the same result when trying the 'root on ZFS,
 boot from UFS' guide here:
 http://wiki.freebsd.org/RootOnZFS/UFSBoot

 Anything interesting happening during your install?  I have an error late in
 the process (During 'Step 3.1') with this command:
 Fixit# mv boot bootdir/

 It gives me an error saying that /bin/cp can't found/executed.  (I've been
 trying to work around using `bin/cp -pRP boot bootdir/`.  Note the lack of
 the leading slash.)

 I had tried several of the other installs from
 http://wiki.freebsd.org/RootOnZFS successfully, but I don't think I'd
 tried the MBR install.

 Daniel T. Staal



I had the same problem. Today, I tried using the PCBSD dvd to install
FreeBSD on ZFS (with /boot on UFS). It kept giving errors just before
completion. However, some comments I found while googling about that
problem mentioned that the installation seemed to have completed,
which seems to be the case. Both FreeBSD and FreeDOS are now installed
on the same drive (in a VM, I'll try this on real h/w next). Still not
sure what caused the error during installation though.

Regards
Gautham Ganapathy
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


ROOT on ZFS with MBR partitions

2011-02-26 Thread Slawomir Wojtczak
Hi,

I have tried these guides:
http://wiki.freebsd.org/RootOnZFS/ZFSBootSlice
http://wiki.freebsd.org/RootOnZFS/ZFSBootPartition

... but none of them seems to work, after installation it hangs at boot like 
that:
http://ompldr.org/vN2tscQ

I am using these guides with 8.2-RELEASE amd64 version.

I know that there is way to do this on GPT partitions, but I need MBR ones ...

Any help appreciated,
vermaden
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: ROOT on ZFS with MBR partitions

2011-02-26 Thread Daniel Staal
--As of February 27, 2011 12:26:04 AM +, Slawomir Wojtczak is alleged 
to have said:



... but none of them seems to work, after installation it hangs at boot
like that: http://ompldr.org/vN2tscQ


--As for the rest, it is mine.

Hmm.  Interesting.  I'm having the same result when trying the 'root on 
ZFS, boot from UFS' guide here:

http://wiki.freebsd.org/RootOnZFS/UFSBoot

Anything interesting happening during your install?  I have an error late 
in the process (During 'Step 3.1') with this command:

Fixit# mv boot bootdir/

It gives me an error saying that /bin/cp can't found/executed.  (I've been 
trying to work around using `bin/cp -pRP boot bootdir/`.  Note the lack of 
the leading slash.)


I had tried several of the other installs from 
http://wiki.freebsd.org/RootOnZFS successfully, but I don't think I'd 
tried the MBR install.


Daniel T. Staal

---
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: ROOT on ZFS with MBR partitions

2011-02-26 Thread Slawomir Wojtczak
 Anything interesting happening during your install?

I would say no, everything seems smooth until I try to boot it.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: ROOT on ZFS with MBR partitions

2011-02-26 Thread Carl Chave
How long are you waiting?  What are you booting from?

On Sat, Feb 26, 2011 at 7:54 PM, Slawomir Wojtczak verma...@gmx.com wrote:

  Anything interesting happening during your install?

 I would say no, everything seems smooth until I try to boot it.

 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 freebsd-questions-unsubscr...@freebsd.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: mbr loader

2010-12-09 Thread Martin Alejandro Paredes Sanchez
On Wednesday 08 December 2010 22:08:56 xinyou yan wrote:
 1. when i install freebsd . I can write mbr and not write
 if i write mbr . freebsd can Identification  windows and load it

first, you are talking about boot loaders or boot managers; its different from 
MBR witch means master boot record

When you say FreeBSD can identify windows and load it, you have wrong the 
concept of FreeBSD can identify, because FreeBSD its not loaded yet, a program 
called BootEasy its the one identifying windows (an others OS) and display F1: 
Windows etc..

 
 2 if i do not write  . How  windows load bsd

http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html#NT-BOOTLOADER

 
 3. Can freebsd load linux  (fedora)? and how  ?

http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html#BOOTEASY-
LOADER

Look in ports for boot loaders (manager)

http://www.freebsd.org/cgi/ports.cgi?query=boot+loaderstype=textsektion=all
http://www.freebsd.org/cgi/ports.cgi?query=boot+managerstype=textsektion=all

Its a good idea to read Chapter 9 (Disks, File Systems, and Boot Loaders) of 
FAQ

http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html

HTH
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


mbr loader

2010-12-08 Thread xinyou yan
1. when i install freebsd . I can write mbr and not write
if i write mbr . freebsd can Identification  windows and load it

2 if i do not write  . How  windows load bsd

3. Can freebsd load linux  (fedora)? and how  ?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: mbr loader

2010-12-08 Thread Da Rock

On 12/09/10 15:08, xinyou yan wrote:

1. when i install freebsd . I can write mbr and not write
 if i write mbr . freebsd can Identification  windows and load it

2 if i do not write  . How  windows load bsd

3. Can freebsd load linux  (fedora)? and how  ?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
   

I can't remember winblow$ method, but I know fedora can load BSD.

I have a temporary setup to test my new bright shiny AND STABLE FreeBSD 
media server (many thanks to all those involved in getting dvb cards 
working on BSD), but I have left the default F10 setup so I can iron out 
bugs and still have a tv if it breaks.


So I setup grub.conf- the man pages are rather useful, but the long and 
the short of it is that its simple to work out: Name the system you want 
to boot, and provide a root for it. Don't chainload.


So the core of it (from memory mind, so check the man and anyone else 
correct the errors) was as follows:


title FreeBSD 8.1
root(hd 1,a)

Root will vary according to your needs. Mine was on a second disk, slice 1a.

I assume from what you have said regarding BSD loading winblow$ that the 
reverse (BSD load linux) would be true too in the same fashion.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Writing to MBR

2010-09-24 Thread tom oakes

Hello,

I have done a clean install of freebsd 8.1 on /dev/ad4s1a with the 
following:


# Intel Core 2 Duo Dual-Core E6300 2.8GHz 1066MHz 2MB Cache Processor

# ASRock G31M-S R2.0 Core 2 Quad/ Intel G31/ FSB 1600(OC)/ DDR2/ AVL/ 
MATX Motherboard


# 4GB (2X2GB) DDR2-1066 PC2 8500 Dual Channel

# Hitachi / WD 1TB 7200 RPM 32MB CACHE SATA 3.0Gb/s
#

kern.geom.debugflags=15160 Gb Disk on  IDE Slave

I added X11, KDE3, emacs, and BASH from ports or packages.

/dev/ad4 has 4 slices of about 240GB. Freebsd is installed on the entire 
first slice.


File system is ufs2 on /dev/ad4s1 and /dev/ad4s2. the other 2 slices do 
not have a filesystem installed.


I did a tar of the / to an external usbdisk.

I decided to install GRUB. (I really didn't need it, the bsd boot loader 
is working. But like the way it looks and it is easy to modify)


I installed grub from the port and copied the required files to 
/boot/grub. I created a menu.lst in /boot/grub.


I created a bootable grub cd which  boots the operating system.

I then tried to copy  stage1 to the MBR with:

fdisk -B -b /boot/grub/stage1 ad4

2 prompts: one to write to MBR, which I answered 'y', and the other to 
modify the partition table that I answered 'n'.


I tried this from the hard disk boot,  my grub bootable cd, and the  
freebsd livecd.

None wrote to the MBR. The freebsd bootloader was still loaded.

I found a post that said to do a sysctl kern.geom.debugflag=16

I tried again. Still didn't work.

I found a post that said for version 8.0 or 8.1 it needed to be 17.  I 
tried that and it still didn't work.


I found a post that said to do a

gpart -bootcode -B /boot/grub/stage1 ad4

and got a message ad4 has bootcode
I did this both before and after doing the sysctl with 16 and 17.

It seems to me that writing the stage1 file to the MBR should be 
straight forward, so I must be missing something simple.


I don't have a critical problem, I can still boot from the freebsd 
bootloader or from my grub cd. After chasing my tail for a

couple of days trying to get grub working, I hate to just give up.

Thanks in advance for any help you can give me

Tom






___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


8.0 amd64 - Royally screwed up MBR (My own fault)

2010-03-24 Thread Gene
Greetings - (not a draft notice)

First thanks to those who responded to my previous question.

Next...

I was attempting to install 8.0 amd64 w/ZFS. I used instructions from the wiki
and when I had trouble, I decided to beat a strategic retreat and just do a
vanilla install. Problem was that either fdisk didn't recognize the mbr
after all the 'gpart create'-ing or simply couldn't start newfs. (Something
about not being able to find an initial inode.) I figured 'gpart destroy ad0'
might fix things but no such luck. fdisk -I ad0 also errors out saying unable
to locate class.

Does anyone know of a simple (brute force?) way to restore simple. standard
MBRs without having to resort to a hex editor? (I will if I have to, but I'd
rather not.)

Thanks for any assistance...

IHN,
Gene

--
To everything there is a season,
And a time to every purpose under heaven.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: 8.0 amd64 - Royally screwed up MBR (My own fault)

2010-03-24 Thread Henrik Hudson
On Wed, 24 Mar 2010, Gene wrote:

 Greetings - (not a draft notice)
 
 First thanks to those who responded to my previous question.
 
 Next...
 
 I was attempting to install 8.0 amd64 w/ZFS. I used instructions from the wiki
 and when I had trouble, I decided to beat a strategic retreat and just do a
 vanilla install. Problem was that either fdisk didn't recognize the mbr
 after all the 'gpart create'-ing or simply couldn't start newfs. (Something
 about not being able to find an initial inode.) I figured 'gpart destroy ad0'
 might fix things but no such luck. fdisk -I ad0 also errors out saying unable
 to locate class.
 
 Does anyone know of a simple (brute force?) way to restore simple. standard
 MBRs without having to resort to a hex editor? (I will if I have to, but I'd
 rather not.)

This will wipe the MBR: dd if=/dev/zero of=/dev/sdb bs=446 count=1

replace of=/dev/sdb  without whatever /dev/sd? you need.

henrik
-- 
Henrik Hudson
li...@rhavenn.net
-
God, root, what is difference? Pitr; UF 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Loader, MBR and the boot process

2010-01-25 Thread Andriy Gapon
on 25/01/2010 04:41 Robert Noland said the following:
 On Mon, 2010-01-25 at 07:57 +1100, Mark Andrews wrote:
  offset  The offset of the start of the partition from the beginning of
  the drive in sectors, or * to have bsdlabel calculate the 
 correct
  offset to use (the end of the previous partition plus one, 
 ignor-
  ing partition `c'.  For partition `c', * will be interpreted as
  an offset of 0.  The first partition should start at offset 16,
  because the first 16 sectors are reserved for metadata.
 
 Ok, now this has my attention... My gut feeling right now is that this
 is a bug in geom_part_bsd.  I don't understand why the label isn't
 protected.  (Adding -b 16 when adding the swap partition fixes this)
 Another project to goes on my list...
 
 If anyone knows why this is done like this... please share.

I presume that this is for purely historic reasons.

-- 
Andriy Gapon
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Loader, MBR and the boot process

2010-01-25 Thread Matthew Seaman

Andriy Gapon wrote:

on 25/01/2010 04:41 Robert Noland said the following:

On Mon, 2010-01-25 at 07:57 +1100, Mark Andrews wrote:

 offset  The offset of the start of the partition from the beginning of
 the drive in sectors, or * to have bsdlabel calculate the correct
 offset to use (the end of the previous partition plus one, ignor-
 ing partition `c'.  For partition `c', * will be interpreted as
 an offset of 0.  The first partition should start at offset 16,
 because the first 16 sectors are reserved for metadata.

Ok, now this has my attention... My gut feeling right now is that this
is a bug in geom_part_bsd.  I don't understand why the label isn't
protected.  (Adding -b 16 when adding the swap partition fixes this)
Another project to goes on my list...

If anyone knows why this is done like this... please share.


I presume that this is for purely historic reasons.



I believe this has been known about since 5.x days:

  http://www.freebsd.org/cgi/query-pr.cgi?pr=72812

As far as I recall, sometime around 6.1-RELEASE this should have been
fixed.  It certainly seems to be the case that it is harmless to have 
a plain swap partition start at offset 0, but anything else, like encrypted

swap or putting a filesystem there needs the 16 sector offset.

Cheers,

Matthew

--
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
 Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
 Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


Re: Loader, MBR and the boot process

2010-01-25 Thread Robert Noland
On Mon, 2010-01-25 at 09:45 +, Matthew Seaman wrote:
 Andriy Gapon wrote:
  on 25/01/2010 04:41 Robert Noland said the following:
  On Mon, 2010-01-25 at 07:57 +1100, Mark Andrews wrote:
   offset  The offset of the start of the partition from the beginning 
  of
   the drive in sectors, or * to have bsdlabel calculate the 
  correct
   offset to use (the end of the previous partition plus one, 
  ignor-
   ing partition `c'.  For partition `c', * will be interpreted 
  as
   an offset of 0.  The first partition should start at offset 
  16,
   because the first 16 sectors are reserved for metadata.
  Ok, now this has my attention... My gut feeling right now is that this
  is a bug in geom_part_bsd.  I don't understand why the label isn't
  protected.  (Adding -b 16 when adding the swap partition fixes this)
  Another project to goes on my list...
 
  If anyone knows why this is done like this... please share.
  
  I presume that this is for purely historic reasons.
  
 
 I believe this has been known about since 5.x days:
 
http://www.freebsd.org/cgi/query-pr.cgi?pr=72812
 
 As far as I recall, sometime around 6.1-RELEASE this should have been
 fixed.  It certainly seems to be the case that it is harmless to have 
 a plain swap partition start at offset 0, but anything else, like encrypted
 swap or putting a filesystem there needs the 16 sector offset.

When the first partition (whatever it is), starts at offset 0, if you dd
into that partition you wipe out the label entirely, which just doesn't
make sense to me.  Trying to manage this in the file system code and the
swap pager or whatever other consumer might make use of the partition
seems like madness to me.

robert.

   Cheers,
 
   Matthew
 
-- 
Robert Noland rnol...@freebsd.org
FreeBSD

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Loader, MBR and the boot process

2010-01-24 Thread Romain Garbage
2010/1/22, Dan Naumov dan.nau...@gmail.com:

 Putting the swap into it's own slice and then putting FreeBSD into
 it's own slice worked fine. So why the hell can't they both coexist in
 1 slice if the swap comes first?

Similar problem here: I have a full-zfs system in a bsd slice, but I
have the zfs-freebsd partition before the swap one. The problem is
that the system doesn't seem to detect the swap partition partition (I
see swapon: /dev/ada0s1b: No such file or directory during boot)

% bsdlabel /dev/ada0s1
# /dev/ada0s1:
8 partitions:
#size   offsetfstype   [fsize bsize bps/cpg]
  a: 530432000   ZFS
  b:  9883342 53043200  swap
  c: 629265420unused0 0 # raw part, don't edit

but to see ada0s1b in /dev/ I have to reload geom_bsd module (loading
it at boot time doesn't work).

Even though (but this seems to be another problem):
% sudo swapon /dev/ada0s1b
swapon: /dev/ada0s1b: Operation not permitted


Regards,
Romain
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Loader, MBR and the boot process

2010-01-24 Thread John
On Fri, Jan 22, 2010 at 07:02:53AM +0200, Dan Naumov wrote:
 On Fri, Jan 22, 2010 at 6:49 AM, Dan Naumov dan.nau...@gmail.com wrote:
  On Fri, Jan 22, 2010 at 6:12 AM, Thomas K. f...@gothschlampen.com wrote:
  On Fri, Jan 22, 2010 at 05:57:23AM +0200, Dan Naumov wrote:
 
  Hi,
 
  I recently found a nifty FreeBSD ZFS root installation script and
  been reworking it a bit to suit my needs better, including changing it
  from GPT to MBR partitioning. However, I was stumped, even though I
  had done everything right (or so I thought), the system would get
  stuck at Loader and refuse to go anywhere. After trying over a dozen
 
  probably this line is the cause:
 
  dd if=/mnt2/boot/zfsboot of=/dev/${TARGETDISK}s1a skip=1 seek=1024
 
  Unless by swap first you meant the on-disk location, and not the
  partition letter. If swap is partition a, you're writing the loader
  into swapspace.
 
 
  Regards,
  Thomas
 
  At first you made me feel silly, but then I decided to double-check, I
  uncommented the swap line in the partitioning part again, ensured I
  was writing the bootloader to ${TARGETDISK}s1b and ran the script.
  Same problem, hangs at loader. Again, if I comment out the swap,
  giving the entire slice to ZFS and then write the bootloader to
  ${TARGETDISK}s1a, run the script, everything works.
 
 I have also just tested creating 2 slices, like this:
 
 gpart create -s mbr ${TARGETDISK}
 gpart add -s 3G -t freebsd ${TARGETDISK}
 gpart create -s BSD ${TARGETDISK}s1
 gpart add -t freebsd-swap ${TARGETDISK}s1
 
 gpart add -t freebsd ${TARGETDISK}
 gpart create -s BSD ${TARGETDISK}s2
 gpart add -t freebsd-zfs ${TARGETDISK}s2
 
 gpart set -a active -i 2 ${TARGETDISK}
 gpart bootcode -b /mnt2/boot/boot0 ${TARGETDISK}
 
 
 and later:
 
 dd if=/mnt2/boot/zfsboot of=/dev/${TARGETDISK}s2 count=1
 dd if=/mnt2/boot/zfsboot of=/dev/${TARGETDISK}s2a skip=1 seek=1024
 
 
 Putting the swap into it's own slice and then putting FreeBSD into
 it's own slice worked fine. So why the hell can't they both coexist in
 1 slice if the swap comes first?

I know what the answer to this USED to be, but I don't know if it is
still true (obviously, I think so, I or wouldn't waste your time).

The filesystem code is all carefully written to avoid the very
first few sector of the partition.  That's because the partition
table is there for the first filesystem of the slice (or disk).
That's a tiny amout of space wasted, because it's also skipped on
all the other filesystems even though there's not actually anything
there, but it was a small inefficency, even in the 70's.

Swap does not behave that way.  SWAP will begin right at the slice
boundry, with 0 offset.  As long as it's not the first partition, no
harm, no foul.  If it IS the first partition, you just nuked your partition
table.  As long as SWAP owns the slice, again, no harm, no foul, but
if there were filesystems BEHIND it, you just lost 'em.

That's the way it always used to be, and I think it still is.  SWAP can
only be first if it is the ONLY thing using that slice (disk), otherwise,
you need a filesystem first to protect the partition table.
-- 

John Lind
j...@starfire.mn.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Loader, MBR and the boot process

2010-01-24 Thread Dan Naumov
On Sun, Jan 24, 2010 at 5:29 PM, John j...@starfire.mn.org wrote:
 On Fri, Jan 22, 2010 at 07:02:53AM +0200, Dan Naumov wrote:
 On Fri, Jan 22, 2010 at 6:49 AM, Dan Naumov dan.nau...@gmail.com wrote:
  On Fri, Jan 22, 2010 at 6:12 AM, Thomas K. f...@gothschlampen.com wrote:
  On Fri, Jan 22, 2010 at 05:57:23AM +0200, Dan Naumov wrote:
 
  Hi,
 
  I recently found a nifty FreeBSD ZFS root installation script and
  been reworking it a bit to suit my needs better, including changing it
  from GPT to MBR partitioning. However, I was stumped, even though I
  had done everything right (or so I thought), the system would get
  stuck at Loader and refuse to go anywhere. After trying over a dozen
 
  probably this line is the cause:
 
  dd if=/mnt2/boot/zfsboot of=/dev/${TARGETDISK}s1a skip=1 seek=1024
 
  Unless by swap first you meant the on-disk location, and not the
  partition letter. If swap is partition a, you're writing the loader
  into swapspace.
 
 
  Regards,
  Thomas
 
  At first you made me feel silly, but then I decided to double-check, I
  uncommented the swap line in the partitioning part again, ensured I
  was writing the bootloader to ${TARGETDISK}s1b and ran the script.
  Same problem, hangs at loader. Again, if I comment out the swap,
  giving the entire slice to ZFS and then write the bootloader to
  ${TARGETDISK}s1a, run the script, everything works.

 I have also just tested creating 2 slices, like this:

 gpart create -s mbr ${TARGETDISK}
 gpart add -s 3G -t freebsd ${TARGETDISK}
 gpart create -s BSD ${TARGETDISK}s1
 gpart add -t freebsd-swap ${TARGETDISK}s1

 gpart add -t freebsd ${TARGETDISK}
 gpart create -s BSD ${TARGETDISK}s2
 gpart add -t freebsd-zfs ${TARGETDISK}s2

 gpart set -a active -i 2 ${TARGETDISK}
 gpart bootcode -b /mnt2/boot/boot0 ${TARGETDISK}


 and later:

 dd if=/mnt2/boot/zfsboot of=/dev/${TARGETDISK}s2 count=1
 dd if=/mnt2/boot/zfsboot of=/dev/${TARGETDISK}s2a skip=1 seek=1024


 Putting the swap into it's own slice and then putting FreeBSD into
 it's own slice worked fine. So why the hell can't they both coexist in
 1 slice if the swap comes first?

 I know what the answer to this USED to be, but I don't know if it is
 still true (obviously, I think so, I or wouldn't waste your time).

 The filesystem code is all carefully written to avoid the very
 first few sector of the partition.  That's because the partition
 table is there for the first filesystem of the slice (or disk).
 That's a tiny amout of space wasted, because it's also skipped on
 all the other filesystems even though there's not actually anything
 there, but it was a small inefficency, even in the 70's.

 Swap does not behave that way.  SWAP will begin right at the slice
 boundry, with 0 offset.  As long as it's not the first partition, no
 harm, no foul.  If it IS the first partition, you just nuked your partition
 table.  As long as SWAP owns the slice, again, no harm, no foul, but
 if there were filesystems BEHIND it, you just lost 'em.

 That's the way it always used to be, and I think it still is.  SWAP can
 only be first if it is the ONLY thing using that slice (disk), otherwise,
 you need a filesystem first to protect the partition table.
 --

 John Lind
 j...@starfire.mn.org

This explanation does sound logical, but holy crap, if this is the
case, you'd think there would be bells, whistles and huge red label
warnings in EVERY FreeBSD installation / partitioning guide out there
warning people to not put swap first (unless given a dedicated slice)
under any circumstances. The warnings were nowhere to be seen and lots
of pointy hair first greyed and were then lost during the process of
me trying to figure out why my system would install but wouldn't boot.

- Sincerely,
Dan Naumov
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Loader, MBR and the boot process

2010-01-24 Thread Mark Andrews

In message cf9b1ee01001240759j2476cf3es2babd8b32a90f...@mail.gmail.com, Dan N
aumov writes:
 On Sun, Jan 24, 2010 at 5:29 PM, John j...@starfire.mn.org wrote:
  On Fri, Jan 22, 2010 at 07:02:53AM +0200, Dan Naumov wrote:
  On Fri, Jan 22, 2010 at 6:49 AM, Dan Naumov dan.nau...@gmail.com wrote=
 :
   On Fri, Jan 22, 2010 at 6:12 AM, Thomas K. f...@gothschlampen.com wro=
 te:
   On Fri, Jan 22, 2010 at 05:57:23AM +0200, Dan Naumov wrote:
  
   Hi,
  
   I recently found a nifty FreeBSD ZFS root installation script and
   been reworking it a bit to suit my needs better, including changing =
 it
   from GPT to MBR partitioning. However, I was stumped, even though I
   had done everything right (or so I thought), the system would get
   stuck at Loader and refuse to go anywhere. After trying over a dozen
  
   probably this line is the cause:
  
   dd if=3D/mnt2/boot/zfsboot of=3D/dev/${TARGETDISK}s1a skip=3D1 seek=
 =3D1024
  
   Unless by swap first you meant the on-disk location, and not the
   partition letter. If swap is partition a, you're writing the loader
   into swapspace.
  
  
   Regards,
   Thomas
  
   At first you made me feel silly, but then I decided to double-check, I
   uncommented the swap line in the partitioning part again, ensured I
   was writing the bootloader to ${TARGETDISK}s1b and ran the script.
   Same problem, hangs at loader. Again, if I comment out the swap,
   giving the entire slice to ZFS and then write the bootloader to
   ${TARGETDISK}s1a, run the script, everything works.
 
  I have also just tested creating 2 slices, like this:
 
  gpart create -s mbr ${TARGETDISK}
  gpart add -s 3G -t freebsd ${TARGETDISK}
  gpart create -s BSD ${TARGETDISK}s1
  gpart add -t freebsd-swap ${TARGETDISK}s1
 
  gpart add -t freebsd ${TARGETDISK}
  gpart create -s BSD ${TARGETDISK}s2
  gpart add -t freebsd-zfs ${TARGETDISK}s2
 
  gpart set -a active -i 2 ${TARGETDISK}
  gpart bootcode -b /mnt2/boot/boot0 ${TARGETDISK}
 
 
  and later:
 
  dd if=3D/mnt2/boot/zfsboot of=3D/dev/${TARGETDISK}s2 count=3D1
  dd if=3D/mnt2/boot/zfsboot of=3D/dev/${TARGETDISK}s2a skip=3D1 seek=3D=
 1024
 
 
  Putting the swap into it's own slice and then putting FreeBSD into
  it's own slice worked fine. So why the hell can't they both coexist in
  1 slice if the swap comes first?
 
  I know what the answer to this USED to be, but I don't know if it is
  still true (obviously, I think so, I or wouldn't waste your time).
 
  The filesystem code is all carefully written to avoid the very
  first few sector of the partition. =A0That's because the partition
  table is there for the first filesystem of the slice (or disk).
  That's a tiny amout of space wasted, because it's also skipped on
  all the other filesystems even though there's not actually anything
  there, but it was a small inefficency, even in the 70's.
 
  Swap does not behave that way. =A0SWAP will begin right at the slice
  boundry, with 0 offset. =A0As long as it's not the first partition, no
  harm, no foul. =A0If it IS the first partition, you just nuked your parti=
 tion
  table. =A0As long as SWAP owns the slice, again, no harm, no foul, but
  if there were filesystems BEHIND it, you just lost 'em.
 
  That's the way it always used to be, and I think it still is. =A0SWAP can
  only be first if it is the ONLY thing using that slice (disk), otherwise,
  you need a filesystem first to protect the partition table.
  --
 
  John Lind
  j...@starfire.mn.org
 
 This explanation does sound logical, but holy crap, if this is the
 case, you'd think there would be bells, whistles and huge red label
 warnings in EVERY FreeBSD installation / partitioning guide out there
 warning people to not put swap first (unless given a dedicated slice)
 under any circumstances. The warnings were nowhere to be seen and lots
 of pointy hair first greyed and were then lost during the process of
 me trying to figure out why my system would install but wouldn't boot.

From man bsdlabel.

 offset  The offset of the start of the partition from the beginning of
 the drive in sectors, or * to have bsdlabel calculate the correct
 offset to use (the end of the previous partition plus one, ignor-
 ing partition `c'.  For partition `c', * will be interpreted as
 an offset of 0.  The first partition should start at offset 16,
 because the first 16 sectors are reserved for metadata.

 - Sincerely,
 Dan Naumov
 ___
 freebsd-sta...@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-stable
 To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742 INTERNET: ma...@isc.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send

Re: Loader, MBR and the boot process

2010-01-24 Thread Robert Noland
On Mon, 2010-01-25 at 07:57 +1100, Mark Andrews wrote:
 In message cf9b1ee01001240759j2476cf3es2babd8b32a90f...@mail.gmail.com, Dan 
 N
 aumov writes:
  On Sun, Jan 24, 2010 at 5:29 PM, John j...@starfire.mn.org wrote:
   On Fri, Jan 22, 2010 at 07:02:53AM +0200, Dan Naumov wrote:
   On Fri, Jan 22, 2010 at 6:49 AM, Dan Naumov dan.nau...@gmail.com wrote=
  :
On Fri, Jan 22, 2010 at 6:12 AM, Thomas K. f...@gothschlampen.com 
wro=
  te:
On Fri, Jan 22, 2010 at 05:57:23AM +0200, Dan Naumov wrote:
   
Hi,
   
I recently found a nifty FreeBSD ZFS root installation script and
been reworking it a bit to suit my needs better, including changing =
  it
from GPT to MBR partitioning. However, I was stumped, even though I
had done everything right (or so I thought), the system would get
stuck at Loader and refuse to go anywhere. After trying over a dozen
   
probably this line is the cause:
   
dd if=3D/mnt2/boot/zfsboot of=3D/dev/${TARGETDISK}s1a skip=3D1 seek=
  =3D1024
   
Unless by swap first you meant the on-disk location, and not the
partition letter. If swap is partition a, you're writing the loader
into swapspace.
   
   
Regards,
Thomas
   
At first you made me feel silly, but then I decided to double-check, I
uncommented the swap line in the partitioning part again, ensured I
was writing the bootloader to ${TARGETDISK}s1b and ran the script.
Same problem, hangs at loader. Again, if I comment out the swap,
giving the entire slice to ZFS and then write the bootloader to
${TARGETDISK}s1a, run the script, everything works.
  
   I have also just tested creating 2 slices, like this:
  
   gpart create -s mbr ${TARGETDISK}
   gpart add -s 3G -t freebsd ${TARGETDISK}
   gpart create -s BSD ${TARGETDISK}s1
   gpart add -t freebsd-swap ${TARGETDISK}s1
  
   gpart add -t freebsd ${TARGETDISK}
   gpart create -s BSD ${TARGETDISK}s2
   gpart add -t freebsd-zfs ${TARGETDISK}s2
  
   gpart set -a active -i 2 ${TARGETDISK}
   gpart bootcode -b /mnt2/boot/boot0 ${TARGETDISK}
  
  
   and later:
  
   dd if=3D/mnt2/boot/zfsboot of=3D/dev/${TARGETDISK}s2 count=3D1
   dd if=3D/mnt2/boot/zfsboot of=3D/dev/${TARGETDISK}s2a skip=3D1 seek=3D=
  1024
  
  
   Putting the swap into it's own slice and then putting FreeBSD into
   it's own slice worked fine. So why the hell can't they both coexist in
   1 slice if the swap comes first?
  
   I know what the answer to this USED to be, but I don't know if it is
   still true (obviously, I think so, I or wouldn't waste your time).
  
   The filesystem code is all carefully written to avoid the very
   first few sector of the partition. =A0That's because the partition
   table is there for the first filesystem of the slice (or disk).
   That's a tiny amout of space wasted, because it's also skipped on
   all the other filesystems even though there's not actually anything
   there, but it was a small inefficency, even in the 70's.
  
   Swap does not behave that way. =A0SWAP will begin right at the slice
   boundry, with 0 offset. =A0As long as it's not the first partition, no
   harm, no foul. =A0If it IS the first partition, you just nuked your parti=
  tion
   table. =A0As long as SWAP owns the slice, again, no harm, no foul, but
   if there were filesystems BEHIND it, you just lost 'em.
  
   That's the way it always used to be, and I think it still is. =A0SWAP can
   only be first if it is the ONLY thing using that slice (disk), otherwise,
   you need a filesystem first to protect the partition table.
   --
  
   John Lind
   j...@starfire.mn.org
  
  This explanation does sound logical, but holy crap, if this is the
  case, you'd think there would be bells, whistles and huge red label
  warnings in EVERY FreeBSD installation / partitioning guide out there
  warning people to not put swap first (unless given a dedicated slice)
  under any circumstances. The warnings were nowhere to be seen and lots
  of pointy hair first greyed and were then lost during the process of
  me trying to figure out why my system would install but wouldn't boot.
 
 From man bsdlabel.
 
  offset  The offset of the start of the partition from the beginning of
  the drive in sectors, or * to have bsdlabel calculate the correct
  offset to use (the end of the previous partition plus one, ignor-
  ing partition `c'.  For partition `c', * will be interpreted as
  an offset of 0.  The first partition should start at offset 16,
  because the first 16 sectors are reserved for metadata.

Ok, now this has my attention... My gut feeling right now is that this
is a bug in geom_part_bsd.  I don't understand why the label isn't
protected.  (Adding -b 16 when adding the swap partition fixes this)
Another project to goes on my list...

If anyone knows why this is done like this... please share.

robert.

  - Sincerely,
  Dan Naumov

Loader, MBR and the boot process

2010-01-21 Thread Dan Naumov
I recently found a nifty FreeBSD ZFS root installation script and
been reworking it a bit to suit my needs better, including changing it
from GPT to MBR partitioning. However, I was stumped, even though I
had done everything right (or so I thought), the system would get
stuck at Loader and refuse to go anywhere. After trying over a dozen
different things, it downed on me to change the partition order inside
the slice, I had 1) swap 2) freebsd-zfs and for the test, I got rid of
swap altogether and gave the entire slice to the freebsd-zfs
partition. Suddenly, my problem went away and the system booted just
fine. So it seems that Loader requires that the partition containing
the files vital to the boot is the first partition on the slice and
that swap first, then the rest doesn't work.

The thing is, I am absolutely positive that in the past, I've had
sysinstall created installs using MBR partitioning and that I had swap
as my first partition inside the slice and that it all worked dandy.
Has this changed at some point? Oh, and for the curious the
installation script is here: http://jago.pp.fi/zfsmbrv1-works.sh


- Sincerely,
Dan Naumov
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Loader, MBR and the boot process

2010-01-21 Thread Thomas K.
On Fri, Jan 22, 2010 at 05:57:23AM +0200, Dan Naumov wrote:

Hi,

 I recently found a nifty FreeBSD ZFS root installation script and
 been reworking it a bit to suit my needs better, including changing it
 from GPT to MBR partitioning. However, I was stumped, even though I
 had done everything right (or so I thought), the system would get
 stuck at Loader and refuse to go anywhere. After trying over a dozen

probably this line is the cause:

dd if=/mnt2/boot/zfsboot of=/dev/${TARGETDISK}s1a skip=1 seek=1024

Unless by swap first you meant the on-disk location, and not the
partition letter. If swap is partition a, you're writing the loader
into swapspace.


Regards,
Thomas
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Loader, MBR and the boot process

2010-01-21 Thread Dan Naumov
On Fri, Jan 22, 2010 at 6:12 AM, Thomas K. f...@gothschlampen.com wrote:
 On Fri, Jan 22, 2010 at 05:57:23AM +0200, Dan Naumov wrote:

 Hi,

 I recently found a nifty FreeBSD ZFS root installation script and
 been reworking it a bit to suit my needs better, including changing it
 from GPT to MBR partitioning. However, I was stumped, even though I
 had done everything right (or so I thought), the system would get
 stuck at Loader and refuse to go anywhere. After trying over a dozen

 probably this line is the cause:

 dd if=/mnt2/boot/zfsboot of=/dev/${TARGETDISK}s1a skip=1 seek=1024

 Unless by swap first you meant the on-disk location, and not the
 partition letter. If swap is partition a, you're writing the loader
 into swapspace.


 Regards,
 Thomas

At first you made me feel silly, but then I decided to double-check, I
uncommented the swap line in the partitioning part again, ensured I
was writing the bootloader to ${TARGETDISK}s1b and ran the script.
Same problem, hangs at loader. Again, if I comment out the swap,
giving the entire slice to ZFS and then write the bootloader to
${TARGETDISK}s1a, run the script, everything works.


- Sincerely,
Dan Naumov
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Loader, MBR and the boot process

2010-01-21 Thread Dan Naumov
On Fri, Jan 22, 2010 at 6:49 AM, Dan Naumov dan.nau...@gmail.com wrote:
 On Fri, Jan 22, 2010 at 6:12 AM, Thomas K. f...@gothschlampen.com wrote:
 On Fri, Jan 22, 2010 at 05:57:23AM +0200, Dan Naumov wrote:

 Hi,

 I recently found a nifty FreeBSD ZFS root installation script and
 been reworking it a bit to suit my needs better, including changing it
 from GPT to MBR partitioning. However, I was stumped, even though I
 had done everything right (or so I thought), the system would get
 stuck at Loader and refuse to go anywhere. After trying over a dozen

 probably this line is the cause:

 dd if=/mnt2/boot/zfsboot of=/dev/${TARGETDISK}s1a skip=1 seek=1024

 Unless by swap first you meant the on-disk location, and not the
 partition letter. If swap is partition a, you're writing the loader
 into swapspace.


 Regards,
 Thomas

 At first you made me feel silly, but then I decided to double-check, I
 uncommented the swap line in the partitioning part again, ensured I
 was writing the bootloader to ${TARGETDISK}s1b and ran the script.
 Same problem, hangs at loader. Again, if I comment out the swap,
 giving the entire slice to ZFS and then write the bootloader to
 ${TARGETDISK}s1a, run the script, everything works.

I have also just tested creating 2 slices, like this:

gpart create -s mbr ${TARGETDISK}
gpart add -s 3G -t freebsd ${TARGETDISK}
gpart create -s BSD ${TARGETDISK}s1
gpart add -t freebsd-swap ${TARGETDISK}s1

gpart add -t freebsd ${TARGETDISK}
gpart create -s BSD ${TARGETDISK}s2
gpart add -t freebsd-zfs ${TARGETDISK}s2

gpart set -a active -i 2 ${TARGETDISK}
gpart bootcode -b /mnt2/boot/boot0 ${TARGETDISK}


and later:

dd if=/mnt2/boot/zfsboot of=/dev/${TARGETDISK}s2 count=1
dd if=/mnt2/boot/zfsboot of=/dev/${TARGETDISK}s2a skip=1 seek=1024


Putting the swap into it's own slice and then putting FreeBSD into
it's own slice worked fine. So why the hell can't they both coexist in
1 slice if the swap comes first?


- Dan Naumov
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


bin/115406: [patch] gpt(8) GPT MBR hangs award BIOS on boot

2010-01-11 Thread Dan Naumov
I have a few questions about this PR:
http://www.freebsd.org/cgi/query-pr.cgi?pr=115406cat=bin

1) Is this bug now officially fixed as of 8.0-RELEASE? Ie, can I
expect to set up a completely GPT-based system using an Intel
D945GCLF2 board and not have the installation crap out on me later?

2) The very last entry into the PR states the following:
The problem has been addressed in gart(8) and gpt(8) is obsolete, so
no follow-up is to be expected at this time. Close the PR to reflect
this.

What exactly is gart and where do I find it's manpage,
http://www.freebsd.org/cgi/man.cgi comes up with nothing? Also, does
this mean that GPT is _NOT_ in fact fixed regarding this bug?

Thanks.

- Sincerely,
Dan Naumov
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: bin/115406: [patch] gpt(8) GPT MBR hangs award BIOS on boot

2010-01-11 Thread Matthew Seaman

Dan Naumov wrote:


What exactly is gart and where do I find it's manpage,
http://www.freebsd.org/cgi/man.cgi comes up with nothing? Also, does
this mean that GPT is _NOT_ in fact fixed regarding this bug?


That's gpart(8).  With a 'p'.  gpart has had significant amounts of
work put into it for 8.0 release, and a lot of people are using it for
eg. ZFS-root based systems, so it will probably work for you.

Cheers,

Matthew

--
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
 Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
 Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


ad0 mountable after sysinstall, but invalid from boot mgr / mbr (7.2-R)

2009-10-22 Thread Steve Franks
Just did an install on a disk.  Never seen this before, but I made my
own partitions instead of 'a' for automatic, and they came up as
ad0s1c-g, instead of ad0s1a-e.

Sysinstall (7.2 release) seemed to progress  complete just fine.

When I try to boot the disk, I get invalid partition, then boot:
0:(ad,0)/boot/kernel/kernel, etc...I've tried every permutation I can
think of on adXs1Y/boot/kernel/kernel at this prompt - it's wedged
tight.

So, I jump back to the liveFS disk, thinking sysinstall zorked the
disk, but I can mount the disk (ad0s1d) just fine, and see the
contents of /mnt/boot/kernel and see /mnt/boot/loader* (never seen a
file with a * in the name, but the one on livefs/boot has a * after
loader too).

Best,
Steve
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: ad0 mountable after sysinstall, but invalid from boot mgr / mbr (7.2-R)

2009-10-22 Thread Polytropon
On Thu, 22 Oct 2009 15:48:01 -0700, Steve Franks bahamasfra...@gmail.com 
wrote:
 So, I jump back to the liveFS disk, thinking sysinstall zorked the
 disk, but I can mount the disk (ad0s1d) just fine, and see the
 contents of /mnt/boot/kernel and see /mnt/boot/loader* (never seen a
 file with a * in the name, but the one on livefs/boot has a * after
 loader too).

The root partition should be /dev/ad0s1a, not ad0s1d.
If it is, specify another boot device for the loader.
Check the examples for rootdisk in /boot/defaults/loader.conf.

Never seen a * after (not in) a file name?

It is possible that the * in /mnt/boot/loader is printed
by the ls command which has the ability to indicate file
types with suffixes (* for executables, @ for symlinks,
/ for directories etc.); check if ls has been aliased for
the shell on the live file system, e. g.

% which ls
ls:  aliased to ls -FG

See man ls for more details. Look, same here:

% ls /boot/loader
/boot/loader*

By the way, the output here is colored, but I can't make
the mail message show this. :-) I have setenv'd LSCOLORS
with this value:

% echo $LSCOLORS
ExGxdxdxCxDxDxBxBxegeg

It only works on color capable terminals, of course.

So don't mind the *, it's completely normal and intended.



According to your booting problem, check if partitions
have been created correctly, and if not, and if you have
the time, start again and create correct partitions, e. g.

/dev/ad0s1a on /
/dev/ad0s1b as swap
/dev/ad0s1c isn't touched at all (whole slice)
/dev/ad0s1d on /tmp
/dev/ad0s1e on /var
/dev/ad0s1f on /usr
/dev/ad0s1g on /home

or whatever layout you prefer. As I mentioned before,
make sure that the booting partition / is a, not d.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: gpart mbr scheme

2009-10-11 Thread Anselm Strauss
Aha, GEOM_PART_MBR is not enabled by default in the 7.2 kernel. That  
changes with 8.0:


http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/amd64/conf/DEFAULTS.diff?r1=1.10.8%3ARELENG_7_2tr1=1.10.8.1r2=1.19.2%3ARELENG_8tr2=1.19.2.1

I recompiled my kernel, now it works!


On Oct 10, 2009, at 22:08 , Anselm Strauss wrote:


Hi,

I'm trying to partition a compact flash card with gpart. When I want  
to create a new MBR scheme it always complains:


- gpart create -s mbr da0
gpart: scheme 'mbr': Invalid argument

The GPT scheme works fine:

- gpart create -s gpt da0
da0 created
- gpart show da0
= 34  8027645  da0  GPT  (3.8G)
  34  8027645   - free -  (3.8G)
- gpart destroy da0
da0 destroyed

The kernel driver seems to be loaded:

- kldstat -v | grep mbr
   278 g_mbr
   277 g_mbrext

Does gpart in 7.2 not support MBR partitioning?


Cheers,
Anselm


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


gpart mbr scheme

2009-10-10 Thread Anselm Strauss

Hi,

I'm trying to partition a compact flash card with gpart. When I want  
to create a new MBR scheme it always complains:


- gpart create -s mbr da0
gpart: scheme 'mbr': Invalid argument

The GPT scheme works fine:

- gpart create -s gpt da0
da0 created
- gpart show da0
= 34  8027645  da0  GPT  (3.8G)
   34  8027645   - free -  (3.8G)
- gpart destroy da0
da0 destroyed

The kernel driver seems to be loaded:

- kldstat -v | grep mbr
278 g_mbr
277 g_mbrext

Does gpart in 7.2 not support MBR partitioning?


Cheers,
Anselm
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Dell perc 2/qc cannot find 7.2 MBR

2009-07-28 Thread Sandy Rutherford
I have been trying to install FreeBSD 7.2 on a i386 system with a Dell
Perc 2/QC SCSI raid card.  The root files system is on a raid 1
volume.  However, after installation the system will not boot.  The
BIOS complains that it cannot find the master boot record.  During
installation, I installed a standard master boot record on the
volume.

Has anybody else seen this?  Suggestions?

Thanks,
Sandy

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


mbr on second drive.

2007-07-06 Thread Grant Peel
Hi all,

I recently used sysinstall to partition and label a new scsi drive.

/dev/da0s1

b (swap)
d/
e/usr
f/var
g/home


I then 'restored' 4 filesystems to it:

/
/usr
/var
/home

Somehow, the disk is not bootable. I get a 'BTX HAlted when I try to boot it.

IS there a way to check the mbr nad fix it if necessary?

Currently, I have a boot drive as the primary, and the one mentioned above as a 
second drive on the machine. The first drive is a ATA and the second (broken) 
is a SCSI.

-GRant
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


mbr on second drive.

2007-07-06 Thread Scott Bennett
 On Fri, 6 Jul 2007 07:56:05 -0400 Grant Peel [EMAIL PROTECTED]

I recently used sysinstall to partition and label a new scsi drive.

/dev/da0s1

b (swap)
d/
e/usr
f/var
g/home


I then 'restored' 4 filesystems to it:

/
/usr
/var
/home

Somehow, the disk is not bootable. I get a 'BTX HAlted when I try to boot it.

 You probably missed a flag somewhere to tell sysinstall that a boot file
should be written.  (Why d?  / usually appears in a.)

IS there a way to check the mbr nad fix it if necessary?

 You have already checked it by attempting to boot from it, right?
 Here's what to do to fix it.  As root:

# bsdlabel -B da0s1
#

Currently, I have a boot drive as the primary, and the one mentioned above as 
a second drive on the machine. The first drive is a ATA and the second 
(broken) is a SCSI.



  Scott Bennett, Comm. ASMELG, CFIAG
**
* Internet:   bennett at cs.niu.edu  *
**
* A well regulated and disciplined militia, is at all times a good  *
* objection to the introduction of that bane of all free governments *
* -- a standing army.   *
*-- Gov. John Hancock, New York Journal, 28 January 1790 *
**
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Missing MBR ?

2007-05-13 Thread Joseph Marah
All of a sudden my MBR prompt has disapeared and replaced by the following:
   
  Intel(R) Boot Agent FEv4.1.17
  Copyright (C) 1997-2004, Intel Corporation
  Intel(R) BootAgent PXE Base Code (PXE-2.1 buildbuild 085)
  Copyright (C) 1997-2004, Intel Corporation
  Client MAC addr .)  GUID...
  PXE-E53:No boot filename received
  PXE-M)F:Exiting Intel Boot Agent.
   
  It then hangs indefinitely.
   
  I suspect there is some setting that has made my i386 FreeeBSD 6.2 boot 
process default to this but can't lay my hands on it.  I have tried Sysinstall 
to restore the master boot record from the menu but it still boots with the 
Intel Boot Agent.  I am new and heve no idea how to use FIXIT.  Please help.
   
  Thanks
  Joseph
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Missing MBR ?

2007-05-13 Thread Derek Ragona

At 03:09 PM 5/13/2007, Joseph Marah wrote:

All of a sudden my MBR prompt has disapeared and replaced by the following:

  Intel(R) Boot Agent FEv4.1.17
  Copyright (C) 1997-2004, Intel Corporation
  Intel(R) BootAgent PXE Base Code (PXE-2.1 buildbuild 085)
  Copyright (C) 1997-2004, Intel Corporation
  Client MAC addr .)  GUID...
  PXE-E53:No boot filename received
  PXE-M)F:Exiting Intel Boot Agent.

  It then hangs indefinitely.


Your boot order is changed, and perhaps not even trying to boot from the 
hard drive.  The above message is trying to boot from the network.


Check your BIOS settings.

-Derek

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


MBR and slices

2006-07-15 Thread horn
After reintalling windows i want to install FreeBSD boot loader
(/boot/boot0), after the second operation of record of the loader is carried 
out writes about the following (precisely I do not remember that wrote 
fdisk):
MBR not write 
Invalid Geom

Esteemed handbook and has tried by means of boot0cfg to put, i wrote the 
following:
# boot0cfg -s 2 ad0
Has not helped too though the loader was, but the chosen system was not 
loaded.
I tried to replace number of slice:
# boot0cfg -s 1 ad0 
Besides the loader was, but the chosen system was not loaded. Has then found 
out that sections on slice at disk ad0 have flied all, on this disk the 
system has been installed.

Whether it is possible to restore a disk or even the information therefrom? 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Hosed my MBR?

2006-04-14 Thread Doug Poland
On Tue, Apr 11, 2006 at 01:27:03PM -0400, Jerry McAllister wrote:
  
  On Tue, April 11, 2006 09:08, Jerry McAllister wrote:
  
   I'm in a bit of a mess here.  I've got an Asus P4C800-E Deluxe
   motherboard with two on-board SATA RAID controllers, an Intel
   MatrixRAID (ICH5R) and Promise Fasttrak (PDC20378).  My BIOS
   allows me to boot from either the Promise or the Intel
   controller.
  
  
   Well, the install CD is also the fixit CD.  You can try booting
   from it and choosing the shell and then trying to run the fdisk
   from that environment to replace the MBR.
  
   I have done that for people who have hosed their MBR on machines
   with Ghost - even their XP only, no FreeBSD, systems, using the
   FreeBSD fixit, I ran fdisk and replaced the MBR with the FreeBSD
   MBR and it worked just fine.
  
  Hi Jerry,
  
  I think the root of my confusion here is the fact that I have two
  RAID controllers and can boot off either controller.
  
  Does that mean I have two MBR's, one for each controller?  If that's
  the case and I boot off a CD-ROM, which MBR am I fixing?
 
 Are both controllers part of the same raid device?   

no, as I said in my OP, each controller hosts a RAID1.  The Intel has
two disks for Win, and the FastTrak has two disks dedicated to FreeBSD.

 Anyway, there needs to be an MBR on each bootable device as well as
 the boot files.   I think that holds true for raid setups as well.  
 
 In addition, the first bootable device that your BIOS sees must have
 an MBR regardless of whether you have 1 or more bootable devices.
 
 In your case, it sounds like you have two raid devices, one on each
 controller.   You would have to have an MBR on each and it sounds like
 you think you wiped the one on the INTEL controller.   Figure out what
 device name the raid on the INTEL controller comes up as and then
 write the MBR to that.
 
Thanks for your response.  My follow-up question to you is how would
running a FBSD fdisk command on the Intel controller fix a hosed WinXP
MBR?  Or is an MBR OS agnostic?


-- 
Regards,
Doug
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Hosed my MBR?

2006-04-14 Thread Jerry McAllister
 
 On Tue, Apr 11, 2006 at 01:27:03PM -0400, Jerry McAllister wrote:
   
   On Tue, April 11, 2006 09:08, Jerry McAllister wrote:
   
I'm in a bit of a mess here.  I've got an Asus P4C800-E Deluxe
motherboard with two on-board SATA RAID controllers, an Intel
MatrixRAID (ICH5R) and Promise Fasttrak (PDC20378).  My BIOS
allows me to boot from either the Promise or the Intel
controller.
   
   
Well, the install CD is also the fixit CD.  You can try booting
from it and choosing the shell and then trying to run the fdisk
from that environment to replace the MBR.
   
I have done that for people who have hosed their MBR on machines
with Ghost - even their XP only, no FreeBSD, systems, using the
FreeBSD fixit, I ran fdisk and replaced the MBR with the FreeBSD
MBR and it worked just fine.
   
   Hi Jerry,
   
   I think the root of my confusion here is the fact that I have two
   RAID controllers and can boot off either controller.
   
   Does that mean I have two MBR's, one for each controller?  If that's
   the case and I boot off a CD-ROM, which MBR am I fixing?
  
  Are both controllers part of the same raid device?   
 
 no, as I said in my OP, each controller hosts a RAID1.  The Intel has
 two disks for Win, and the FastTrak has two disks dedicated to FreeBSD.
 
  Anyway, there needs to be an MBR on each bootable device as well as
  the boot files.   I think that holds true for raid setups as well.  
  
  In addition, the first bootable device that your BIOS sees must have
  an MBR regardless of whether you have 1 or more bootable devices.
  
  In your case, it sounds like you have two raid devices, one on each
  controller.   You would have to have an MBR on each and it sounds like
  you think you wiped the one on the INTEL controller.   Figure out what
  device name the raid on the INTEL controller comes up as and then
  write the MBR to that.
  
 Thanks for your response.  My follow-up question to you is how would
 running a FBSD fdisk command on the Intel controller fix a hosed WinXP
 MBR?  Or is an MBR OS agnostic?

Well, the FreeBSD MBR is.   I have used a FreeBSD MBR to fix a hosed
MBR (hosed by Ghost) on an XP only (eg. no FreeBSD on it) machine and 
it worked fine.  

I suspect it might not work in the reverse direction, though.  The MS
MBR is not known for playing nice with other OS boot sectors.  I don't
know what the difference it.

Is there some other disk and [preferrably SCSI] controller you can 
stick in and install FreeBSD on and try to mount and check out the
raid that you think is hosed before doing anything irreversable?
I forgot if you said you had tried looking at it with a fixit disk
but that might work if the raid is hardware raid.

jerry

 
 -- 
 Regards,
 Doug
 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Hosed my MBR?

2006-04-14 Thread Doug Poland
On Fri, Apr 14, 2006 at 11:51:58AM -0400, Jerry McAllister wrote:
   
   In your case, it sounds like you have two raid devices, one on
   each controller.   You would have to have an MBR on each and it
   sounds like you think you wiped the one on the INTEL controller.
   Figure out what device name the raid on the INTEL controller comes
   up as and then write the MBR to that.
   
  Thanks for your response.  My follow-up question to you is how would
  running a FBSD fdisk command on the Intel controller fix a hosed
  WinXP MBR?  Or is an MBR OS agnostic?
 
 Well, the FreeBSD MBR is.   I have used a FreeBSD MBR to fix a hosed
 MBR (hosed by Ghost) on an XP only (eg. no FreeBSD on it) machine and
 it worked fine.  
 
really?  I suspect it was sysinstall's fdisk that hosed my MBR on the
Intel controller in the first place.  Cause now it brings up a broken
FreeBSD boot loader instead of the WinXP loader.

 I suspect it might not work in the reverse direction, though.  The MS
 MBR is not known for playing nice with other OS boot sectors.  I don't
 know what the difference it.
 
hmmm...

 Is there some other disk and [preferrably SCSI] controller you can
 stick in and install FreeBSD on and try to mount and check out the
 raid that you think is hosed before doing anything irreversable?  I
 forgot if you said you had tried looking at it with a fixit disk but
 that might work if the raid is hardware raid.
 
I can still boot FreeBSD off my FastTrack controller (ar0), that's where
I'm writing this email from.  I can see both the Intel RAID device
(ar1), and mount the data from NTFS (ar1s1), and newly created UFS-2
(ar1s2).  I even did a dd of the MBR from ar0 and ar1 and compared the
two.  Of course, I don't know what I'm looking at so that didn't go too
far :)

-- 
Regards,
Doug
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Hosed my MBR?

2006-04-14 Thread Jerry McAllister
 
 On Fri, Apr 14, 2006 at 11:51:58AM -0400, Jerry McAllister wrote:

In your case, it sounds like you have two raid devices, one on
each controller.   You would have to have an MBR on each and it
sounds like you think you wiped the one on the INTEL controller.
Figure out what device name the raid on the INTEL controller comes
up as and then write the MBR to that.

   Thanks for your response.  My follow-up question to you is how would
   running a FBSD fdisk command on the Intel controller fix a hosed
   WinXP MBR?  Or is an MBR OS agnostic?
  
  Well, the FreeBSD MBR is.   I have used a FreeBSD MBR to fix a hosed
  MBR (hosed by Ghost) on an XP only (eg. no FreeBSD on it) machine and
  it worked fine.  
  
 really?  I suspect it was sysinstall's fdisk that hosed my MBR on the
 Intel controller in the first place.  Cause now it brings up a broken
 FreeBSD boot loader instead of the WinXP loader.
 
  I suspect it might not work in the reverse direction, though.  The MS
  MBR is not known for playing nice with other OS boot sectors.  I don't
  know what the difference it.
  
 hmmm...
 
  Is there some other disk and [preferrably SCSI] controller you can
  stick in and install FreeBSD on and try to mount and check out the
  raid that you think is hosed before doing anything irreversable?  I
  forgot if you said you had tried looking at it with a fixit disk but
  that might work if the raid is hardware raid.
  
 I can still boot FreeBSD off my FastTrack controller (ar0), that's where
 I'm writing this email from.  I can see both the Intel RAID device
 (ar1), and mount the data from NTFS (ar1s1), and newly created UFS-2
 (ar1s2).  I even did a dd of the MBR from ar0 and ar1 and compared the
 two.  Of course, I don't know what I'm looking at so that didn't go too
 far :)

This has lasted long enough that I am forgetting parts, such as it
is the MS piece that doesn't boot, not the FreeBSD.

But, if you get a FreeBSD boot loader, then it is not the MBR that is
hosed, but the boot sector itself.  Probably bsdlabel wrote on it and
not fdisk.  That could be a little more difficult, since those boot
sectors can be quite different and are not OS agnostic.

In this case, your best bet may be to mount the MS file system from 
the FreeBSD side and copy it somewhere for safety and then try to 
rebuild the MS system from scratch.   Note, I said 'may' be.  If
someone was to raise an argument, I would fall over easily.
But, you should still be able to mount the MS file slice and
read it from the FreeBSD side and use that to check it and squirrel
it away somewhere.  Here is an fstab entry I use on this machine to
mount my MS-XP slice as /mydos:
/dev/ad0s2  /mydos  msdos   rw  0   0
It happens to be FAT, but there is one for NTFS as well.  But, last I
checked, FreeBSD can read, but not write NTFS, just FATs.

jerry

 
 -- 
 Regards,
 Doug
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Hosed my MBR?

2006-04-14 Thread Doug Poland
On Fri, Apr 14, 2006 at 12:49:50PM -0400, Jerry McAllister wrote:
  
  I can still boot FreeBSD off my FastTrack controller (ar0), that's
  where I'm writing this email from.  I can see both the Intel RAID
  device (ar1), and mount the data from NTFS (ar1s1), and newly
  created UFS-2 (ar1s2).  I even did a dd of the MBR from ar0 and ar1
  and compared the two.  Of course, I don't know what I'm looking at
  so that didn't go too far :)
 
 This has lasted long enough that I am forgetting parts, such as it is
 the MS piece that doesn't boot, not the FreeBSD.
 
 But, if you get a FreeBSD boot loader, then it is not the MBR that is
 hosed, but the boot sector itself.  Probably bsdlabel wrote on it and
 not fdisk.  That could be a little more difficult, since those boot
 sectors can be quite different and are not OS agnostic.
 
That makes sense.

 In this case, your best bet may be to mount the MS file system from 
 the FreeBSD side and copy it somewhere for safety and then try to 
 rebuild the MS system from scratch.   Note, I said 'may' be.  If
 someone was to raise an argument, I would fall over easily.

A WinXP re-install was always my last resort.  I was hoping for
something quicker.  Data recovery isn't an issue as all my important
data is kept on a file server.  Thanks for your help.

-- 
Regards,
Doug
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Hosed my MBR?

2006-04-11 Thread Jerry McAllister
 
 Hello,
 
 I'm in a bit of a mess here.  I've got an Asus P4C800-E Deluxe
 motherboard with two on-board SATA RAID controllers, an Intel MatrixRAID
 (ICH5R) and Promise Fasttrak (PDC20378).  My BIOS allows me to boot
 from either the Promise or the Intel controller.
 
 The PDC20378 runs two drives in a RAID0 configuration booting FreeBSD
 6.0-STABLE.  The entire drive (ar0) is dedicated to FreeBSD and I have
 the boot-manager installed.   The ICH5R also runs two drives in a
 RAID0 for Windows XP.  I allocated roughly 25% of the drive (ar1) to
 Windows NTFS (ar1s1) and left the remaining disk open. 
 
 Now that 6.x supports the ICH5R I decided to use the leftover disk (ar1)
 for a FreeBSD slice.  I used sysinstall's fdisk to create the slice in
 the unused portion of the disk.  I successfully committed the changes.  I
 then used # newfs /dev/ar1s2 to create a file-system and it went fine.
 
 The problem is, now, when I attempt to boot off the Intel controller, I
 get a FreeBSD boot load failure:

 ---
 
 Invalid Partition
 Invalid Partition
 
 No /boot/loader
 
 FreeBSD/i386 boot
 Default: 0:ad(0,a)/boot/kernel/kernel
 boot:
 
 Invalid partition
 No /boot/kernel/kernel
 
 FreeBSD/i386 boot
 Default: 0:ad(0,a)/boot/kernel/kernel
 boot:
 
 ---
 
 So it would seem I hosed my MBR.  The question is, how did I do it and
 how do I fix it?  I would think that when I choose to leave the MBR
 untouched in sysinstall, that it would do just that.  
 
 I cannot use the old DOS boot floppy trick of:  fdisk /MBR as DOS will
 not recognize my Intel controller.  Windows installation media is
 equally clueless.  I want to be very careful here so as not to render my
 entire system useless.  A thought occurred to me that I might be able to
 get a MBR from another Windows box 
 
freesbie# dd if=/dev/ad0 of=/mnt/nfs/tmp/XP.mbr bs=512 count=79
hosedbox# dd if=/mnt/nfs/tmp/XP.mbr of=/dev/ar1 bs=512 count=79
 
 and write that over my bad MBR.  Does that make sense?  Is there a
 better way?

Well, the install CD is also the fixit CD.  You can try booting from
it and choosing the shell and then trying to run the fdisk from that
environment to replace the MBR.  

I have done that for people who have hosed their MBR on machines with 
Ghost - even their XP only, no FreeBSD, systems, using the FreeBSD fixit, 
I ran fdisk and replaced the MBR with the FreeBSD MBR and it worked just fine.

Now, if that is not really the problem, of course that won't fix
anything.  But it shouldn't hurt either.   And you could really mess things
up with the dd.

Good luck,

jerry
 
 
 -- 
 Regards,
 Doug
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Hosed my MBR?

2006-04-11 Thread Doug Poland
On Tue, April 11, 2006 09:08, Jerry McAllister wrote:

 I'm in a bit of a mess here.  I've got an Asus P4C800-E Deluxe
 motherboard with two on-board SATA RAID controllers, an Intel
 MatrixRAID (ICH5R) and Promise Fasttrak (PDC20378).  My BIOS allows
 me to boot from either the Promise or the Intel controller.


 Well, the install CD is also the fixit CD.  You can try booting from
 it and choosing the shell and then trying to run the fdisk from that
 environment to replace the MBR.

 I have done that for people who have hosed their MBR on machines with
 Ghost - even their XP only, no FreeBSD, systems, using the FreeBSD
 fixit, I ran fdisk and replaced the MBR with the FreeBSD MBR and it
 worked just fine.

Hi Jerry,

I think the root of my confusion here is the fact that I have two RAID
controllers and can boot off either controller.

Does that mean I have two MBR's, one for each controller?  If that's
the case and I boot off a CD-ROM, which MBR am I fixing?


-- 
Regards,
Doug

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Hosed my MBR?

2006-04-11 Thread Jerry McAllister
 
 On Tue, April 11, 2006 09:08, Jerry McAllister wrote:
 
  I'm in a bit of a mess here.  I've got an Asus P4C800-E Deluxe
  motherboard with two on-board SATA RAID controllers, an Intel
  MatrixRAID (ICH5R) and Promise Fasttrak (PDC20378).  My BIOS allows
  me to boot from either the Promise or the Intel controller.
 
 
  Well, the install CD is also the fixit CD.  You can try booting from
  it and choosing the shell and then trying to run the fdisk from that
  environment to replace the MBR.
 
  I have done that for people who have hosed their MBR on machines with
  Ghost - even their XP only, no FreeBSD, systems, using the FreeBSD
  fixit, I ran fdisk and replaced the MBR with the FreeBSD MBR and it
  worked just fine.
 
 Hi Jerry,
 
 I think the root of my confusion here is the fact that I have two RAID
 controllers and can boot off either controller.
 
 Does that mean I have two MBR's, one for each controller?  If that's
 the case and I boot off a CD-ROM, which MBR am I fixing?

Are both controllers part of the same raid device?   say you have some
disk on one and others on the other and they are all lumped in to the
same raid device?I don't even know if you can do that as I haven't
tried or looked at it.   But, it goes by the address you use in 
the fdisk command.

I don't know if it being raid messes things up or not.   Any time I have 
done anything with raid, I had a separate boot and system device outside 
of the raid.  The raid was lumping together disks to make a larger 
work data storage.

Anyway, there needs to be an MBR on each bootable device as well as the
boot files.   I think that holds true for raid setups as well.  

In addition, the first bootable device that your BIOS sees must have 
an MBR regardless of whether you have 1 or more bootable devices.

In your case, it sounds like you have two raid devices, one on each
controller.   You would have to have an MBR on each and it sounds like 
you think you wiped the one on the INTEL controller.   Figure out what
device name the raid on the INTEL controller comes up as and then write
the MBR to that.

jerry
 
 
 -- 
 Regards,
 Doug
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
 
 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Hosed my MBR?

2006-04-10 Thread Doug Poland
Hello,

I'm in a bit of a mess here.  I've got an Asus P4C800-E Deluxe
motherboard with two on-board SATA RAID controllers, an Intel MatrixRAID
(ICH5R) and Promise Fasttrak (PDC20378).  My BIOS allows me to boot
from either the Promise or the Intel controller.

The PDC20378 runs two drives in a RAID0 configuration booting FreeBSD
6.0-STABLE.  The entire drive (ar0) is dedicated to FreeBSD and I have
the boot-manager installed.   The ICH5R also runs two drives in a
RAID0 for Windows XP.  I allocated roughly 25% of the drive (ar1) to
Windows NTFS (ar1s1) and left the remaining disk open. 

Now that 6.x supports the ICH5R I decided to use the leftover disk (ar1)
for a FreeBSD slice.  I used sysinstall's fdisk to create the slice in
the unused portion of the disk.  I successfully committed the changes.  I
then used # newfs /dev/ar1s2 to create a file-system and it went fine.

The problem is, now, when I attempt to boot off the Intel controller, I
get a FreeBSD boot load failure:

---

Invalid Partition
Invalid Partition

No /boot/loader

FreeBSD/i386 boot
Default: 0:ad(0,a)/boot/kernel/kernel
boot:

Invalid partition
No /boot/kernel/kernel

FreeBSD/i386 boot
Default: 0:ad(0,a)/boot/kernel/kernel
boot:

---

So it would seem I hosed my MBR.  The question is, how did I do it and
how do I fix it?  I would think that when I choose to leave the MBR
untouched in sysinstall, that it would do just that.  

I cannot use the old DOS boot floppy trick of:  fdisk /MBR as DOS will
not recognize my Intel controller.  Windows installation media is
equally clueless.  I want to be very careful here so as not to render my
entire system useless.  A thought occurred to me that I might be able to
get a MBR from another Windows box 

   freesbie# dd if=/dev/ad0 of=/mnt/nfs/tmp/XP.mbr bs=512 count=79
   hosedbox# dd if=/mnt/nfs/tmp/XP.mbr of=/dev/ar1 bs=512 count=79

and write that over my bad MBR.  Does that make sense?  Is there a
better way?


-- 
Regards,
Doug
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Hosed my MBR?

2006-04-10 Thread Huy Ton That
Boot off the WinXP disc  enter the repair utility (console).

You can type 'help' for all the commands.

There's a command called fixmbr; I think this is what you are looking for.

On 4/10/06, Doug Poland [EMAIL PROTECTED] wrote:

 Hello,

 I'm in a bit of a mess here.  I've got an Asus P4C800-E Deluxe
 motherboard with two on-board SATA RAID controllers, an Intel MatrixRAID
 (ICH5R) and Promise Fasttrak (PDC20378).  My BIOS allows me to boot
 from either the Promise or the Intel controller.

 The PDC20378 runs two drives in a RAID0 configuration booting FreeBSD
 6.0-STABLE.  The entire drive (ar0) is dedicated to FreeBSD and I have
 the boot-manager installed.   The ICH5R also runs two drives in a
 RAID0 for Windows XP.  I allocated roughly 25% of the drive (ar1) to
 Windows NTFS (ar1s1) and left the remaining disk open.

 Now that 6.x supports the ICH5R I decided to use the leftover disk (ar1)
 for a FreeBSD slice.  I used sysinstall's fdisk to create the slice in
 the unused portion of the disk.  I successfully committed the changes.  I
 then used # newfs /dev/ar1s2 to create a file-system and it went fine.

 The problem is, now, when I attempt to boot off the Intel controller, I
 get a FreeBSD boot load failure:

 ---

 Invalid Partition
 Invalid Partition

 No /boot/loader

 FreeBSD/i386 boot
 Default: 0:ad(0,a)/boot/kernel/kernel
 boot:

 Invalid partition
 No /boot/kernel/kernel

 FreeBSD/i386 boot
 Default: 0:ad(0,a)/boot/kernel/kernel
 boot:

 ---

 So it would seem I hosed my MBR.  The question is, how did I do it and
 how do I fix it?  I would think that when I choose to leave the MBR
 untouched in sysinstall, that it would do just that.

 I cannot use the old DOS boot floppy trick of:  fdisk /MBR as DOS will
 not recognize my Intel controller.  Windows installation media is
 equally clueless.  I want to be very careful here so as not to render my
 entire system useless.  A thought occurred to me that I might be able to
 get a MBR from another Windows box

freesbie# dd if=/dev/ad0 of=/mnt/nfs/tmp/XP.mbr bs=512 count=79
hosedbox# dd if=/mnt/nfs/tmp/XP.mbr of=/dev/ar1 bs=512 count=79

 and write that over my bad MBR.  Does that make sense?  Is there a
 better way?


 --
 Regards,
 Doug
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 [EMAIL PROTECTED]

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Hosed my MBR?

2006-04-10 Thread Doug Poland
On Mon, Apr 10, 2006 at 08:06:11PM -0400, Huy Ton That wrote:
 On 4/10/06, Doug Poland [EMAIL PROTECTED] wrote:
 
  Hello,
 
  I'm in a bit of a mess here.  I've got an Asus P4C800-E Deluxe
  motherboard with two on-board SATA RAID controllers, an Intel MatrixRAID
  (ICH5R) and Promise Fasttrak (PDC20378).  My BIOS allows me to boot
  from either the Promise or the Intel controller.
 
  ...
  
  The problem is, now, when I attempt to boot off the Intel controller, I
  get a FreeBSD boot load failure:
 
  Invalid Partition
  Invalid Partition
 
  So it would seem I hosed my MBR.  The question is, how did I do it and
  how do I fix it?  I would think that when I choose to leave the MBR
  untouched in sysinstall, that it would do just that.
 
  I cannot use the old DOS boot floppy trick of:  fdisk /MBR as DOS will
  not recognize my Intel controller.  Windows installation media is
  equally clueless.  I want to be very careful here so as not to render my
  entire system useless.  A thought occurred to me that I might be able to
  get a MBR from another Windows box
 
 freesbie# dd if=/dev/ad0 of=/mnt/nfs/tmp/XP.mbr bs=512 count=79
 hosedbox# dd if=/mnt/nfs/tmp/XP.mbr of=/dev/ar1 bs=512 count=79
 
  and write that over my bad MBR.  Does that make sense?  Is there a
  better way?
 

 Boot off the WinXP disc  enter the repair utility (console).
 
 You can type 'help' for all the commands.
 
 There's a command called fixmbr; I think this is what you are looking for.
 
Now this is getting OT, but recovery console doesn't show my drive.  How
do I know that it will fix the correct MBR?  Don't I have two MBR's?
one on each controller?

-- 
Regards,
Doug
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Help with lost MBR on USB HDD

2006-03-12 Thread Jarrod O'Flaherty

Hi fbsd_user,

Happy to help!

The tools I used were:
 dd (pre-installed in FreeBSD)
 chexedit (available under /usr/ports/editors/chexedit)

In terms of literature I read a great deal, all of which was helpful.

Perhaps the most helpful links though were:

o http://www.ata-atapi.com/hiwchs.htm

o http://support.microsoft.com/kb/q140418/

o http://www.ranish.com/part/primer.htm
o http://cnlart.web.cern.ch/cnlart/236/disk_partition.html

o http://www.faqs.org/docs/Linux-HOWTO/Large-Disk-HOWTO.html#s6

o http://mirror.href.com/thestarman/asm/mbr/DiskTerms.htm

o http://home.att.net/~rayknights/pc_boot/w95b_mbr.htm

o http://www.linuxjournal.com/article/8661

o http://www.digit-life.com/articles/bootman/index.html

o http://www.uneraser.com/mbr-damaged.htm

o http://www.storagereview.com/guide2000/ref/hdd/file/part.html

o http://linux.com.hk/penguin/man/8/gpart.html

You might also like to look into the tool gpart, the last link in the
list above. I didn't need anything that sophisticated fortunately.

Good luck!!

Regards,
Jarrod.


 -Original Message-
 From: fbsd_user [mailto:[EMAIL PROTECTED] 
 Sent: Saturday, March 11, 2006 2:41 AM
 To: Jarrod O'Flaherty
 Subject: RE: Help with lost MBR on USB HDD
 
 
 I am having problem with my mbr.
 Interested in knowing what tool you used to manipulate the 
 mbr. Also would like to receive your bookmarks on this 
 subject. Any other tips or things you learned would be helpful.
 
 Thanks
 
 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Help with lost MBR on USB HDD

2006-03-09 Thread Jarrod O'Flaherty

[Apologies. Posting again with thread header.]
 

For those who might be interested...


 Message: 26
 Date: Sun, 05 Mar 2006 13:46:30 -0500
 From: Gerard Seibert [EMAIL PROTECTED]
 Subject: Re: Help with lost MBR on USB HDD
 To: freebsd-questions@freebsd.org
 Message-ID: [EMAIL PROTECTED]
 Content-Type: text/plain; charset=UTF-8
 
 Jarrod O'Flaherty wrote:
 
  And last but not least, I really hope someone can tell me how I can 
  salvage my MBR  other 3 partitions. If that is not possible, then 
  perhaps you can point me in the direction of a tool which will 
  salvage the files on the lost slices? There's not heaps of data 
  there, only around 20 GB or so across all three. But if I can, I'd 
  really like to get it back. I'm hoping NTFS is robust enough to 
  allow salvaging like this?
  
  Any and all help GREATLY appreciated!!
  
  Thankyou,
  Jarrod.
 
 I know you do not want to hear this, but why on earth did you
 attempt to mess with the HD without a full backup in place first?
 
 I am not sure if you can recover the lost data. If not, this would be 
 a good time to wipe the disk clean and partition it to your liking. I 
 believe that you will have to install Windows before installing 
 FreeBSD.
 
 Good Luck!
 --
 Gerard
 


I've done a lot of reading the last couple of days into the MBR and the
like.
Have to say it's a tad tough going, but quite a bit of fun at the same
time. ;)

Gerard, yes, this would be a good opportunity to wipe it and start
again.
If only it wasn't for those MP3s. ;)

For those who couldn't read my last email because it was rather a bit 
too long, the short of it is that FDISK fried my USB HDD's MBR when 
I asked it to change a partition type's from NTFS to FreeBSD.

Why did this happen? 

Does anyone have a large (blank!) USB HDD that they could experiment
with? It would be great to see if this problem is replicable on FreeBSD.

If so, I would suggest that a PR needs to be raised against FDISK.

For anyone in the distant future who perhaps has trouble with their MBR
and/or partitions I've found a stack of great literature on the web I'd
be more 
than happy to post up.

Also, tools that you might be interested in in order to investigate
things are:

- dskprobe.exe (WinNT / XP Support Tool for hex viewing disk)
- dd  (Data [File] dumping tool in Linux / BSD)
- hd  (Pretty print tool -- used with dd it apparently gets similar
results to Dskprobe.exe)
- gpart  (Partition search and retrieval tool -- not yet tried myself)
- part.exe  (Ranish Partition Manager tool -- runs under DOS)

They would be the main ones thus far. Anyone know of anything else I
should be
checking out?

As it is, now that I am armed to the teeth, I hope to find out how much
damage my 
USB HDD suffered, and then hopefully patch up the MBR and/or Logical
Drives I lost.

Keep you all posted.

Cheers,
Jarrod.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Help with lost MBR on USB HDD

2006-03-09 Thread Jarrod O'Flaherty
 
 Message: 26
 Date: Sun, 05 Mar 2006 13:46:30 -0500
 From: Gerard Seibert [EMAIL PROTECTED]
 Subject: Re: Help with lost MBR on USB HDD
 To: freebsd-questions@freebsd.org
 Message-ID: [EMAIL PROTECTED]
 Content-Type: text/plain; charset=UTF-8
 
 
 I know you do not want to hear this, but why on earth did you 
 attempt to
 mess with the HD without a full backup in place first?
 
 I am not sure if you can recover the lost data. If not, this 
 would be a
 good time to wipe the disk clean and partition it to your liking. I
 believe that you will have to install Windows before 
 installing FreeBSD.
 
 Good Luck!
 -- 
 Gerard

I accidentally posted a reply to this which didn't appear in the thread.
Check it out on Mar 07 in freebsd-questions.
(How do I ensure my replies get threaded btw?)
Please see that one for a few details on what I did to find a solution
to the problem.

You'll all be happy to know ;) that everything turned out ok in the end!
I got my disks back and my MP3s.

It turned out that it was just a single partition entry in the MBR that
had been erased.
Once I calculated what it should have been and restored it things were
good to go.

The handy tools were:
- dd
- chexedit (available in /port/editors/chexedit )

Plus I read a ton of stuff on the internet, the bookmarks for which I
will be happy
to share with anyone who needs them. 

Cheers,
Jarrod.




___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Help with lost MBR on USB HDD

2006-03-07 Thread Jarrod O'Flaherty

For anyone who might be interested...

 Jarrod O'Flaherty wrote:
 
  And last but not least, I really hope someone can tell me how I can
  salvage my MBR  other 3 partitions. If that is not possible, then
  perhaps you can point me in the direction of a tool which will
salvage
  the files on the lost slices? There's not heaps of data there, only
  around 20 GB or so across all three. But if I can, I'd really like
to
  get it back. I'm hoping NTFS is robust enough to allow salvaging
like
  this?
  
  Any and all help GREATLY appreciated!!
  
  Thankyou,
  Jarrod.
 
 I know you do not want to hear this, but why on earth did you 
 attempt to mess with the HD without a full backup in place first?
 
 I am not sure if you can recover the lost data. If not, this would be
a
 good time to wipe the disk clean and partition it to your liking. I
 believe that you will have to install Windows before 
 installing FreeBSD.
 
 Good Luck!
 -- 
 Gerard
 

I've done a lot of reading the last couple of days into the MBR and the
like.
Have to say it's a tad tough going, but quite a bit of fun at the same
time. ;)

Gerard, yes, this would be a good opportunity to wipe it and start
again.
If only it wasn't for those MP3s. ;)

For those who couldn't read my last email because it was rather a bit 
too long, the short of it is that FDISK fried my USB HDD's MBR when 
I asked it to change a partition type's from NTFS to FreeBSD.

Why did this happen? 

Does anyone have a large (blank!) USB HDD that they could experiment
with? It would be great to see if this problem is replicable on FreeBSD.

If so, I would suggest that a PR needs to be raised against FDISK.

For anyone in the distant future who perhaps has trouble with their MBR
and/or partitions I've found a stack of great literature on the web I'd
be more 
than happy to post up.

Also, tools that you might be interested in in order to investigate
things are:

- dskprobe.exe (WinNT / XP Support Tool for hex viewing disk)
- dd  (Data [File] dumping tool in Linux / BSD)
- hd  (Pretty print tool -- used with dd it apparently gets similar
results to Dskprobe.exe)
- gpart  (Partition search and retrieval tool -- not yet tried myself)
- part.exe  (Ranish Partition Manager tool -- runs under DOS)

They would be the main ones thus far. Anyone know of anything else I
should be
checking out?

As it is, now that I am armed to the teeth, I hope to find out how much
damage my 
USB HDD suffered, and then hopefully patch up the MBR and/or Logical
Drives I lost.

Keep you all posted.

Cheers,
Jarrod.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Help with lost MBR on USB HDD

2006-03-05 Thread Jarrod O'Flaherty

Hi All,

I have a dual boot system going with WinXP and FreeBSD on my laptop.
Just before I installed FreeBSD I bought a USB HDD to plug in so I could
transfer some files off my laptop's internal HDD and make space for it. 

Alas, even with doing that I could only get a measly 7 GB free, which I
used up pretty quickly building the JRE for OpenOffice. When I got my
USB HDD I split it into 4 x 60GB slices (partitions), changing one of
them from the default NTFS to FAT32, so I could share it with FreeBSD.

While the sharing was ok, unfortunately FAT32 doesn't support symlinks
and this led to errors when I tried to use that slice for building stuff
in ports.

I decided I needed a native UFS2 slice instead of a FAT32 one and set to
work. 

Firstly, I have Acronis PartitionExpert Personal and according to
that, all the slices apparently existed (past tense!) in a single
logical partition. I used the program to change my *THIRD* slice
(between 120GB and 180GB) from existing in the logical partition to
being a physical partition in its own right. Was this a bad move, not
being at the end of the disk? Acronis never complained and it all seemed
to work ok.

I then proceeded to try to change its type from 7 (NTFS) to 165
(FreeBSD). Acronis said it needed to reboot to do this, you know that
odd, special WinXP (safe?) mode? When it did so though it said my drive
was not present. Was this because the USB drivers aren't loaded in that
odd WinXP pseudo-DOS blocky character mode? Or was this because I had
my USB drive on auto power-off and it took too long to windup? 

Anyway, whichever it may be, PartitionExpert said that it couldn't find
the drive so it couldn't change the type.

I then thought well surely if I can't do it under XP then I can do this
under FreeBSD. I looked at the MBR under fdisk and it had 2 entries, one
for the logical partition and one for the new physical partition I had
setup with PartExp.

I must admit I was more comfortable with the fdisk in sysinstall, since
I had used that when installing FreeBSD, so I changed to that one. The
display seemed a little odd because it had about 8 entries, my four 60
GB slices, plus four other very small slices between each 60GB slice. A
couple were 63 in size, but the one just above the partition I wanted
to change (da0s2) was 7 in size. I wrote down the lines around the
partition I wanted to change, but didn't write the whole table out as it
was rather long winded. Aerrr, bummer!

Anyway, I changed the Type from 7 to 165. And that's ALL I did. I then
Wrote the table out and exited. I went into the labelling tool (also in
sysinstall) and set the slice as one big FreeBSD partition. The
labelling tool automatically newfs'ed it for me, and things were good to
go. 

Next I exited sysinstall and mounted my partition under FreeBSD.
Everything was great.

Past tense.

When I next booted into WinXP a few minutes later, all my NTFS drives
were gone. A quick look under Acronis told me only my FreeBSD slice
remained. 

Ummm, so what had gone wrong? Any ideas? 

I went back into FreeBSD and had a look at the MBR under fdisk (the
command line version this time) and now there was no entry 1, just an
entry 2, pointing to the FreeBSD slice. So I had lost my 3 other slices,
from 0 - 60 GB (NTFS), 60 - 120 GB (NTFS), and 180 GB - end_of_disk
(FAT32).

Can anyone please tell me what happened when I ran sysinstall's fdisk?
Can anyone also perhaps tell me where the slice (partition) info is kept
for a logical partition? Since the MBR only had 1 entry for the other 3
partitions their info is obviously not stored there. Where and how is it
stored? 

And last but not least, I really hope someone can tell me how I can
salvage my MBR  other 3 partitions. If that is not possible, then
perhaps you can point me in the direction of a tool which will salvage
the files on the lost slices? There's not heaps of data there, only
around 20 GB or so across all three. But if I can, I'd really like to
get it back. I'm hoping NTFS is robust enough to allow salvaging like
this?

Any and all help GREATLY appreciated!!

Thankyou,
Jarrod.



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Help with lost MBR on USB HDD

2006-03-05 Thread Gerard Seibert
Jarrod O'Flaherty wrote:

 Hi All,
 
 I have a dual boot system going with WinXP and FreeBSD on my laptop.
 Just before I installed FreeBSD I bought a USB HDD to plug in so I could
 transfer some files off my laptop's internal HDD and make space for it. 
 
 Alas, even with doing that I could only get a measly 7 GB free, which I
 used up pretty quickly building the JRE for OpenOffice. When I got my
 USB HDD I split it into 4 x 60GB slices (partitions), changing one of
 them from the default NTFS to FAT32, so I could share it with FreeBSD.
 
 While the sharing was ok, unfortunately FAT32 doesn't support symlinks
 and this led to errors when I tried to use that slice for building stuff
 in ports.
 
 I decided I needed a native UFS2 slice instead of a FAT32 one and set to
 work. 
 
 Firstly, I have Acronis PartitionExpert Personal and according to
 that, all the slices apparently existed (past tense!) in a single
 logical partition. I used the program to change my *THIRD* slice
 (between 120GB and 180GB) from existing in the logical partition to
 being a physical partition in its own right. Was this a bad move, not
 being at the end of the disk? Acronis never complained and it all seemed
 to work ok.
 
 I then proceeded to try to change its type from 7 (NTFS) to 165
 (FreeBSD). Acronis said it needed to reboot to do this, you know that
 odd, special WinXP (safe?) mode? When it did so though it said my drive
 was not present. Was this because the USB drivers aren't loaded in that
 odd WinXP pseudo-DOS blocky character mode? Or was this because I had
 my USB drive on auto power-off and it took too long to windup? 
 
 Anyway, whichever it may be, PartitionExpert said that it couldn't find
 the drive so it couldn't change the type.
 
 I then thought well surely if I can't do it under XP then I can do this
 under FreeBSD. I looked at the MBR under fdisk and it had 2 entries, one
 for the logical partition and one for the new physical partition I had
 setup with PartExp.
 
 I must admit I was more comfortable with the fdisk in sysinstall, since
 I had used that when installing FreeBSD, so I changed to that one. The
 display seemed a little odd because it had about 8 entries, my four 60
 GB slices, plus four other very small slices between each 60GB slice. A
 couple were 63 in size, but the one just above the partition I wanted
 to change (da0s2) was 7 in size. I wrote down the lines around the
 partition I wanted to change, but didn't write the whole table out as it
 was rather long winded. Aerrr, bummer!
 
 Anyway, I changed the Type from 7 to 165. And that's ALL I did. I then
 Wrote the table out and exited. I went into the labelling tool (also in
 sysinstall) and set the slice as one big FreeBSD partition. The
 labelling tool automatically newfs'ed it for me, and things were good to
 go. 
 
 Next I exited sysinstall and mounted my partition under FreeBSD.
 Everything was great.
 
 Past tense.
 
 When I next booted into WinXP a few minutes later, all my NTFS drives
 were gone. A quick look under Acronis told me only my FreeBSD slice
 remained. 
 
 Ummm, so what had gone wrong? Any ideas? 
 
 I went back into FreeBSD and had a look at the MBR under fdisk (the
 command line version this time) and now there was no entry 1, just an
 entry 2, pointing to the FreeBSD slice. So I had lost my 3 other slices,
 from 0 - 60 GB (NTFS), 60 - 120 GB (NTFS), and 180 GB - end_of_disk
 (FAT32).
 
 Can anyone please tell me what happened when I ran sysinstall's fdisk?
 Can anyone also perhaps tell me where the slice (partition) info is kept
 for a logical partition? Since the MBR only had 1 entry for the other 3
 partitions their info is obviously not stored there. Where and how is it
 stored? 
 
 And last but not least, I really hope someone can tell me how I can
 salvage my MBR  other 3 partitions. If that is not possible, then
 perhaps you can point me in the direction of a tool which will salvage
 the files on the lost slices? There's not heaps of data there, only
 around 20 GB or so across all three. But if I can, I'd really like to
 get it back. I'm hoping NTFS is robust enough to allow salvaging like
 this?
 
 Any and all help GREATLY appreciated!!
 
 Thankyou,
 Jarrod.

I know you do not want to hear this, but why on earth did you attempt to
mess with the HD without a full backup in place first?

I am not sure if you can recover the lost data. If not, this would be a
good time to wipe the disk clean and partition it to your liking. I
believe that you will have to install Windows before installing FreeBSD.

Good Luck!
-- 
Gerard
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: MBR blown away

2006-02-12 Thread Peter

--- Jerry McAllister [EMAIL PROTECTED] wrote:

  
  
  --- Jerry McAllister [EMAIL PROTECTED] wrote:
  

I added a slice to a single hard drive dual-boot (windows) system
 and
   now
I guess that scrambled my MBR.  I get three options from the
 FreeBSD
   (5.4)
boot manager:

1. DOS
2. FreeBSD
3. FreeBSD

I can boot to FreeBSD (the new slice is fine) by choosing option 3
 but
   the
windows/dos option is fried.
   
   The MBR itself looks OK.   According to that piece of menu you
   posted, you just added another bootable slice.  So, there are now
two
   bootable FreeBSD slices and one bootable Microsloth slice.   

  Correct, I chose '1' and then the system hangs (no messages/errors).

  I simply converted a 6GB FAT32 partition into a UFS2 slice (chopped
  into three 2GB partitions).

 Well, I still am guessing the problem lies in individual slices' boot 
 sectors and not the MBR.  just try and set the bootable flags in the 
 slices the way you think they should be and see what happens.   

In sysinstall I toggle bootable but it puts an 'A' which seems to mean
auto-bootable. 
I can only set one 'A' here.

--
Peter






__ 
Find your next car at http://autos.yahoo.ca
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: MBR blown away

2006-02-12 Thread Ken Stevenson

Peter wrote:

--- Jerry McAllister [EMAIL PROTECTED] wrote:



--- Jerry McAllister [EMAIL PROTECTED] wrote:




I added a slice to a single hard drive dual-boot (windows) system

and

now

I guess that scrambled my MBR.  I get three options from the

FreeBSD

(5.4)

boot manager:

1. DOS
2. FreeBSD
3. FreeBSD

I can boot to FreeBSD (the new slice is fine) by choosing option 3

but

the

windows/dos option is fried.

The MBR itself looks OK.   According to that piece of menu you
posted, you just added another bootable slice.  So, there are now

two
bootable FreeBSD slices and one bootable Microsloth slice.   



Correct, I chose '1' and then the system hangs (no messages/errors).



I simply converted a 6GB FAT32 partition into a UFS2 slice (chopped
into three 2GB partitions).


Well, I still am guessing the problem lies in individual slices' boot 
sectors and not the MBR.  just try and set the bootable flags in the 
slices the way you think they should be and see what happens.   


In sysinstall I toggle bootable but it puts an 'A' which seems to mean
auto-bootable. 
I can only set one 'A' here.


--
Peter




I tend to agree with Jerry and others that the problem is not with the 
MBR, but with the Windows boot sector in the first partition. If 
that's true, you can't fix it with sysintall or FreeBSD. You have fix 
it with Windows tools.


If you were running Windows 2000 or XP in the Windows partition, I 
would recommend that you use the Windows 2000 System Recovery Console 
and run the fixboot program to install a new Windows boot sector on 
the Windows partition. If you're running an older version of Windows, 
you need to find out what tool it uses to restore a boot sector.


Chances are in the process you'll wipe out the FreBSD MBR which you'll 
have to fix using FreeBSD. I guess that's where boot0cfg comes in, but 
I've never used it.


The best advice, though, is to backup everything you can before 
proceeding.


--
Ken Stevenson
Allen-Myland Inc.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: MBR blown away

2006-02-11 Thread Jerry McAllister
 
 I need help.
 
 I added a slice to a single hard drive dual-boot (windows) system and now
 I guess that scrambled my MBR.  I get three options from the FreeBSD (5.4)
 boot manager:
 
 1. DOS
 2. FreeBSD
 3. FreeBSD
 
 I can boot to FreeBSD (the new slice is fine) by choosing option 3 but the
 windows/dos option is fried.

The MBR itself looks OK.   According to that piece of menu you posted, you 
just added another bootable slice.  So, there are now two bootable FreeBSD 
slices and one bootable Microsloth slice.   

Are you saying that the MS slice will no longer boot if you select '1' from
the menu?If that is the case, it is not the MBR that was messed up.  
It is something in the MS slice - probably their boot sector.   I don't even 
pretend to know how MS sets up theirs if it is any different from FreeBSD.

But, the MBR is doing what it is supposed to do.  It discovers all the
bootable slices and makes a menu and transfers control to the selected
slice.  What happens after that is not the problem of the MBR.

That may be bad news, I suppose.  It might be easier to fix the MBR
than the MS slice boot code if it is actually messed up.

It might be as simple as you managed to mark the MS slice as not bootable
in some way, but in that case, I wouldn't expect the MBR to be able to
see that slice and put it in the menu as bootable.

Did you use some utility to shrink the original two slices to fit in
the new one?  Or was there already unused space (previously unallocated)
that you were using?Maybe the utility you used to shrink the other
slices messed something up.You might need to go back to it and
check it out.

Was the MS slice an NTFS type file system?   Many of the free utilities
for resizing slices do not work properly on NTFS systems.   So, it is 
possible, in that case, that the MS slice was not shrunk properly and
so it got trashed at that stage.

Just some thing to consider.
Good luck,

jerry

 My current strategy is to use boot0cfg:
 
 # boot0cfg -B
 
 But I'm a little squeemish.  I don't want to be locked out of FreeBSD (I
 barely use Windows but I still would like it back for Visio).  Any
 guidance?

As per my comments above, I don't think rewriting the MBR will help any.
/jrm
 
 --
 Peter
 
 
   
 
   
   
 __ 
 Find your next car at http://autos.yahoo.ca
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
 
 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: MBR blown away

2006-02-11 Thread Duane Whitty

Jerry McAllister wrote:

I need help.

I added a slice to a single hard drive dual-boot (windows) system and now
I guess that scrambled my MBR.  I get three options from the FreeBSD (5.4)
boot manager:

1. DOS
2. FreeBSD
3. FreeBSD

I can boot to FreeBSD (the new slice is fine) by choosing option 3 but the
windows/dos option is fried.


The MBR itself looks OK.   According to that piece of menu you posted, you 
just added another bootable slice.  So, there are now two bootable FreeBSD 
slices and one bootable Microsloth slice.   


Are you saying that the MS slice will no longer boot if you select '1' from
the menu?If that is the case, it is not the MBR that was messed up.  
It is something in the MS slice - probably their boot sector.   I don't even 
pretend to know how MS sets up theirs if it is any different from FreeBSD.


But, the MBR is doing what it is supposed to do.  It discovers all the
bootable slices and makes a menu and transfers control to the selected
slice.  What happens after that is not the problem of the MBR.

That may be bad news, I suppose.  It might be easier to fix the MBR
than the MS slice boot code if it is actually messed up.

It might be as simple as you managed to mark the MS slice as not bootable
in some way, but in that case, I wouldn't expect the MBR to be able to
see that slice and put it in the menu as bootable.

Did you use some utility to shrink the original two slices to fit in
the new one?  Or was there already unused space (previously unallocated)
that you were using?Maybe the utility you used to shrink the other
slices messed something up.You might need to go back to it and
check it out.

Was the MS slice an NTFS type file system?   Many of the free utilities
for resizing slices do not work properly on NTFS systems.   So, it is 
possible, in that case, that the MS slice was not shrunk properly and

so it got trashed at that stage.

Just some thing to consider.
Good luck,

jerry


My current strategy is to use boot0cfg:

# boot0cfg -B

But I'm a little squeemish.  I don't want to be locked out of FreeBSD (I
barely use Windows but I still would like it back for Visio).  Any
guidance?


As per my comments above, I don't think rewriting the MBR will help any.
/jrm

--
Peter

Hi,

Just out of curiosity, did you try using 
sysinstall again to take a look at things?  Maybe 
you can mark your Windows partition bootable?


Trying this might at least tell you whether your 
Windows slice is fried or not.


I know I seem to have some sort of trouble along 
these lines every time I do a fresh install 
because I'm always trying to run so many different 
systems on one machine.  Windows just doesn't play 
nice.  But so far I have always been able to get 
things straightened out.


--Duane


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: MBR blown away

2006-02-11 Thread Peter

--- Jerry McAllister [EMAIL PROTECTED] wrote:

  
  I need help.
  
  I added a slice to a single hard drive dual-boot (windows) system and
 now
  I guess that scrambled my MBR.  I get three options from the FreeBSD
 (5.4)
  boot manager:
  
  1. DOS
  2. FreeBSD
  3. FreeBSD
  
  I can boot to FreeBSD (the new slice is fine) by choosing option 3 but
 the
  windows/dos option is fried.
 
 The MBR itself looks OK.   According to that piece of menu you posted,
 you 
 just added another bootable slice.  So, there are now two bootable
 FreeBSD 
 slices and one bootable Microsloth slice.   


The thing is, I never ran the boot manager after changing the (existing
FAT32) windows partition to a FreeBSD slice.  The boot manager config
would be the same and so it continues to list DOS as a bootable partition
when it is/may not.

 Are you saying that the MS slice will no longer boot if you select '1'
 from
 the menu?If that is the case, it is not the MBR that was messed up. 


Correct, I chose '1' and then the system hangs (no messages/errors).

 It is something in the MS slice - probably their boot sector.   I don't
 even 
 pretend to know how MS sets up theirs if it is any different from
 FreeBSD.
 
 But, the MBR is doing what it is supposed to do.  It discovers all the
 bootable slices and makes a menu and transfers control to the selected
 slice.  What happens after that is not the problem of the MBR.


I don't think the MBR discovers anything.  It is pre-defined to just point
to the bootable partitions.  And it is the boot manager that creates the
menu probably by looking at the MBR.  AFAIK, the boot manager must be
explicitly instructed to do that (sysintall must provide this instruction
during a full install).
 
 Did you use some utility to shrink the original two slices to fit in
 the new one?  Or was there already unused space (previously unallocated)
 that you were using?

I simply converted a 6GB FAT32 partition into a UFS2 slice (chopped into
three 2GB partitions).

--
Peter






__ 
Find your next car at http://autos.yahoo.ca
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: MBR blown away

2006-02-11 Thread Jerry McAllister
 
 
 --- Jerry McAllister [EMAIL PROTECTED] wrote:
 
   
   I need help.
   
   I added a slice to a single hard drive dual-boot (windows) system and
  now
   I guess that scrambled my MBR.  I get three options from the FreeBSD
  (5.4)
   boot manager:
   
   1. DOS
   2. FreeBSD
   3. FreeBSD
   
   I can boot to FreeBSD (the new slice is fine) by choosing option 3 but
  the
   windows/dos option is fried.
  
  The MBR itself looks OK.   According to that piece of menu you posted,
  you 
  just added another bootable slice.  So, there are now two bootable
  FreeBSD 
  slices and one bootable Microsloth slice.   
 
 
 The thing is, I never ran the boot manager after changing the (existing
 FAT32) windows partition to a FreeBSD slice.  The boot manager config
 would be the same and so it continues to list DOS as a bootable partition
 when it is/may not.
 
  Are you saying that the MS slice will no longer boot if you select '1'
  from
  the menu?If that is the case, it is not the MBR that was messed up. 
 
 
 Correct, I chose '1' and then the system hangs (no messages/errors).
 
  It is something in the MS slice - probably their boot sector.   I don't
  even 
  pretend to know how MS sets up theirs if it is any different from
  FreeBSD.
  
  But, the MBR is doing what it is supposed to do.  It discovers all the
  bootable slices and makes a menu and transfers control to the selected
  slice.  What happens after that is not the problem of the MBR.
 
 
 I don't think the MBR discovers anything.  It is pre-defined to just point
 to the bootable partitions.  And it is the boot manager that creates the
 menu probably by looking at the MBR.  AFAIK, the boot manager must be
 explicitly instructed to do that (sysintall must provide this instruction
 during a full install).

  
  Did you use some utility to shrink the original two slices to fit in
  the new one?  Or was there already unused space (previously unallocated)
  that you were using?
 
 I simply converted a 6GB FAT32 partition into a UFS2 slice (chopped into
 three 2GB partitions).

Well, I still am guessing the problem lies in individual slices' boot 
sectors and not the MBR.  just try and set the bootable flags in the 
slices the way you think they should be and see what happens.   

jerry

 
 --
 Peter
 
 
   
 
   
   
 __ 
 Find your next car at http://autos.yahoo.ca
 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: MBR blown away

2006-02-11 Thread James Long
 Date: Fri, 10 Feb 2006 21:19:07 -0500 (EST)
 From: Peter [EMAIL PROTECTED]
 Subject: MBR blown away
 To: freebsd-questions freebsd-questions@freebsd.org
 Message-ID: [EMAIL PROTECTED]
 Content-Type: text/plain; charset=iso-8859-1
 
 I need help.
 
 I added a slice to a single hard drive dual-boot (windows) system and now
 I guess that scrambled my MBR.  I get three options from the FreeBSD (5.4)
 boot manager:
 
 1. DOS
 2. FreeBSD
 3. FreeBSD
 
 I can boot to FreeBSD (the new slice is fine) by choosing option 3 but the
 windows/dos option is fried.
 
 My current strategy is to use boot0cfg:
 
 # boot0cfg -B
 
 But I'm a little squeemish.  I don't want to be locked out of FreeBSD (I
 barely use Windows but I still would like it back for Visio).  Any
 guidance?

Start by making a full backup of your FreeBSD installation.  Then 
you'll feel less squeamish about whatever you do next.

Jim

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


MBR blown away

2006-02-10 Thread Peter
I need help.

I added a slice to a single hard drive dual-boot (windows) system and now
I guess that scrambled my MBR.  I get three options from the FreeBSD (5.4)
boot manager:

1. DOS
2. FreeBSD
3. FreeBSD

I can boot to FreeBSD (the new slice is fine) by choosing option 3 but the
windows/dos option is fried.

My current strategy is to use boot0cfg:

# boot0cfg -B

But I'm a little squeemish.  I don't want to be locked out of FreeBSD (I
barely use Windows but I still would like it back for Visio).  Any
guidance?

--
Peter






__ 
Find your next car at http://autos.yahoo.ca
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: MBR blown away

2006-02-10 Thread Lorin Lund

Peter wrote:

I need help.

I added a slice to a single hard drive dual-boot (windows) system and now
I guess that scrambled my MBR.  I get three options from the FreeBSD (5.4)
boot manager:

1. DOS
2. FreeBSD
3. FreeBSD
  

I would think that the appearance of the above menu, and the fact that
it functions correctly when you choose FreeBSD indicates that the MBR is 
intact.  I

would presume, then, that the Windows partition has been damaged.

If the file system the Windows partition is healty in general with just 
a few files
in the boot sequence being damaged or missing you should be able to 
re-install
Windows in that partition and find all your data and applications 
present and in
good shape.  If however the filesystem in the Windows partition is 
messed up you

may have lost everything.

If you do re-install windows it will probably replace the MBR that is 
there with

what Windows consideres to be a 'standard' MBR.  I think you can use dd to
copy the MBR that is currently there.

Then to get back to FreeBSD you'll have to use fdisk to set the active 
partition

to FreeBSD.  Then you can, hopefully, restore the MBR you saved.

I can boot to FreeBSD (the new slice is fine) by choosing option 3 but the
windows/dos option is fried.

My current strategy is to use boot0cfg:

# boot0cfg -B

But I'm a little squeemish.  I don't want to be locked out of FreeBSD (I
barely use Windows but I still would like it back for Visio).  Any
guidance?

--
Peter






__ 
Find your next car at http://autos.yahoo.ca

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


  


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: MBR blown away

2006-02-10 Thread Ken Stevenson

Peter wrote:

I need help.

I added a slice to a single hard drive dual-boot (windows) system and now
I guess that scrambled my MBR.  I get three options from the FreeBSD (5.4)
boot manager:

1. DOS
2. FreeBSD
3. FreeBSD

I can boot to FreeBSD (the new slice is fine) by choosing option 3 but the
windows/dos option is fried.

My current strategy is to use boot0cfg:

# boot0cfg -B

But I'm a little squeemish.  I don't want to be locked out of FreeBSD (I
barely use Windows but I still would like it back for Visio).  Any
guidance?

--
Peter


This article might provide a clue:

http://www.extremetech.com/article2/0,1697,1918391,00.asp

--
Ken Stevenson
Allen-Myland Inc.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: how to copy MBR??

2005-12-04 Thread Robert Slade
On Sun, 2005-12-04 at 01:49, Javier Matos wrote:
 Hi, I will change the hard drive of my computer and I was thinking that maybe 
 it can run if I make partitions in the new hard drive (the same number of 
 partitions using the same device name), copy all the files contained in the 
 old hard drive to the new one and finally copy MBR from old hard drive to the 
 new one... .
 
 Can it be a solution to the problem of changing hard drives of my computer or 
 that that I tell is a stupid thing??
 
 Thx

Javier,

Have a look at man dd.

Rob

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: how to copy MBR???

2005-12-04 Thread Damon Blom
javier
   Take a look at freebsd cheat sheets - moving to a larger hard drive.
  Damon
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: how to copy MBR??

2005-12-04 Thread Gayn Winters
 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Javier Matos
 Sent: Saturday, December 03, 2005 5:50 PM
 To: freebsd-questions@freebsd.org
 Subject: how to copy MBR??
 
 
 Hi, I will change the hard drive of my computer and I was 
 thinking that maybe it can run if I make partitions in the 
 new hard drive (the same number of partitions using the same 
 device name), copy all the files contained in the old hard 
 drive to the new one and finally copy MBR from old hard drive 
 to the new one... .
 
 Can it be a solution to the problem of changing hard drives 
 of my computer or that that I tell is a stupid thing??
 
 Javier,

You should do a little reading first.  The Handbook has a good section
on this, and there are MANY posts on the topic.  The bottom line is that
a naïve copy using dd or cp won't work.  (Well, dd will work but
assuming your new disk is larger, it won't be optimal.)  You are
probably better off with a new install on the new disk, and then doing
dump and restore to transfer the relevant user data.  This is a good
time to rethink how your data are stored, and the handbook has a section
on rearranging your directories.  This is a popular topic and there are
any HOWTO's out there that Google will find for you.  If you have room
physically, using the old disk as an extra drive is something I'd
suggest as well.  In fact, it makes the dump|restore work particularly
well.

-gayn


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: how to copy MBR??

2005-12-04 Thread Steve Quinn
--- Javier Matos [EMAIL PROTECTED] wrote:

 Hi, I will change the hard drive of my computer and I was thinking that maybe 
 it can run if I
 make partitions in the new hard drive (the same number of partitions using 
 the same device
 name), copy all the files contained in the old hard drive to the new one and 
 finally copy MBR
 from old hard drive to the new one... .
 
 Can it be a solution to the problem of changing hard drives of my computer or 
 that that I tell
 is a stupid thing??
 
 Thx

Hello Javier

If I am interpreting your question correctly, It sounds like you want to copy 
your FreeBSD
installation to a different disk

If so, I have had great success with this procedure

http://lantech.geekvenue.net/chucktips/jason/chuck/1004897633/index_html

I hope this helps

Take care

Steve



__ 
Yahoo! DSL – Something to write home about. 
Just $16.99/mo. or less. 
dsl.yahoo.com 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


how to copy MBR??

2005-12-03 Thread Javier Matos
Hi, I will change the hard drive of my computer and I was thinking that maybe 
it can run if I make partitions in the new hard drive (the same number of 
partitions using the same device name), copy all the files contained in the old 
hard drive to the new one and finally copy MBR from old hard drive to the new 
one... .

Can it be a solution to the problem of changing hard drives of my computer or 
that that I tell is a stupid thing??

Thx
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


mbr and boot disks?

2005-10-21 Thread Mark

Hi

I am currently dual booting between windows and freebsd but I need to
reinstall windows on the other partition. How do I create a freebsd boot
disk so that after windows rewrites my mbr I can still get back to bsd?
Then how would I re-install freebsd's boot manager so I can continue to
dual boot?

thanks

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: mbr and boot disks?

2005-10-21 Thread Björn König

Mark wrote:


I am currently dual booting between windows and freebsd but I need to
reinstall windows on the other partition. How do I create a freebsd boot
disk so that after windows rewrites my mbr I can still get back to bsd?
Then how would I re-install freebsd's boot manager so I can continue to
dual boot?


Hello Mark,

use disc1* of FreeBSD. Boot from CD-ROM and choose Fixit and then 
CDROM/DVD and run boot0cfg -B /dev/ad0. That's it.


*) The live filesystem is on disc2 if you use FreeBSD 5.3 or previous 
versions.


Regards
Björn
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


  1   2   3   >