Re: Booting MFS from Secondary Partition

2010-03-07 Thread Jonathan McKeown
On Saturday 06 March 2010 15:02:20 Martin McCormick wrote:
 Fbsd1 writes:
  just dd the image to what ever drive you want

   That is the goal. The challenge is to launch a script
 that detects when the boot device has been unmounted as dd will
 not work on an active file system.

Martin

it may or may not work, but there's a sysctl for the geom subsystem which 
might do what you want.

sysctl kern.geom.debugflags=16

This used to be used (for all i know still can be) to allow writing metadata 
for (eg) building a gmirror on a mounted disk - it's often referred to as the 
``allow-footshooting'' flag.

That might allow you to dd your image onto the mounted disk - i'd either try 
it with a handy spare system or wait for someone more expert than i to 
comment, though.

Jonathan
___
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: Booting MFS from Secondary Partition

2010-03-06 Thread Martin McCormick
Fbsd1 writes:
 just dd the image to what ever drive you want

That is the goal. The challenge is to launch a script
that detects when the boot device has been unmounted as dd will
not work on an active file system.

Memory disk images apparently survive until reboot so
there is a possibility that one can get in the write between the
umount of everything and complete shutdown.

I am truly impressed with how robust FreeBSD is as it
probably should be very hard to log in to a working system and
remotely rebuild it. I did read one of many introductory
articles about mfsbsd that tells you to just use scp to get the
image over to the target system and then, as root, use dd to
apply it to the boot device. That is not possible unless one
first boots from some other medium.

Martin McCormick
___
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: Booting MFS from Secondary Partition

2010-03-05 Thread Martin McCormick
Fbsd1 writes:
 There is hard coded logic that is stopping you from doing what you want.
 Looks like you are SOL.

Me thinks you are absolutely correct. I was only hoping
I was doing something wrong and a slight syntax change would
make it work. Thank you and thanks to Maciej Milewski m...@dat.pl
for his suggestion.

I have one last trick up my sleve before giving up
completely on this idea. Maybe I can hijack one of the rc.x
scripts to cause it to spew a memory disk image of the mfsboot
code on to the freshly-unmounted /dev/ad0 device during a
reboot. Since the goal is to completely rebuild the system
anyway, this would be the last gasp of the present system as it
gets ready to reboot, hopefully with mfsbsd and all hard drives
dismounted.

Martin McCormick
___
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: Booting MFS from Secondary Partition

2010-03-05 Thread Fbsd1

Martin McCormick wrote:

Fbsd1 writes:

There is hard coded logic that is stopping you from doing what you want.
Looks like you are SOL.


Me thinks you are absolutely correct. I was only hoping
I was doing something wrong and a slight syntax change would
make it work. Thank you and thanks to Maciej Milewski m...@dat.pl
for his suggestion.

I have one last trick up my sleve before giving up
completely on this idea. Maybe I can hijack one of the rc.x
scripts to cause it to spew a memory disk image of the mfsboot
code on to the freshly-unmounted /dev/ad0 device during a
reboot. Since the goal is to completely rebuild the system
anyway, this would be the last gasp of the present system as it
gets ready to reboot, hopefully with mfsbsd and all hard drives
dismounted.

Martin McCormick
___
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



just dd the image to what ever drive you want
___
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: Booting MFS from Secondary Partition

2010-03-04 Thread Fbsd1

Martin McCormick wrote:

I have hit one of these impenetrable walls in which nothing
seems to work but I know it should. I have tried several
versions of /boot.config to no avail. The idea is exactly the
same principle as described in depenguinator which is software
that lets one use grub in Linux to install FreeBSD on a working
Linux system. The idea is to steal the swap partition, put mfsboot
there, and then tell grub to boot from that partition rather than the
normal active one.

The manual for boot.config makes me think I should be
able to just put in the information describing the secondary
partition and it should cause a boot from that one but:

/boot.config: 1:ad(0,b)/boot/loader -P

FreeBSD/i386 boot
Default: 1:ad(0,b)/boot/loader
boot:
error 1 lba 0
No /boot/loader

The mfsboot image works when started from the primary
partition so I am stuck as to why boot.config is not starting
from that secondary partition.
The present boot.config is:

1:ad(0,b)/boot/loader -P

If mfsbsd was starting, shouldn't it see its boot
loader?

Is there a mfsbsd discussion list? Surely, somebody else
has hit this brick wall, also.




From what I read in this freebsd.org article
http://www.freebsd.org/doc/en/articles/remote-install/index.html

There is hard coded logic that is stopping you from doing what you want.
Looks like you are SOL.

Booting mfsBSD
Now that the mfsBSD image is ready, it must be uploaded to the remote 
system running a live rescue system or pre-installed Linux® 
distribution. The most suitable tool for this task is scp:


# scp disk.img r...@192.168.0.2:.
To boot mfsBSD image properly, it must be placed on the first (bootable) 
device of the given machine. This may be accomplished using this example 
providing that sda is the first bootable disk device:


# dd if=/root/disk.img of=/dev/sda bs=1m
If all went well, the image should now be in the MBR of the first device 
and the machine can be rebooted. Watch for the machine to boot up 
properly with the ping(8) tool. Once it has came back on-line, it should 
be possible to access it over ssh(1) as user root with the configured 
password.



The mfsbsd process has new maintainer,  Martin Matuska m...@freebsd.org
Email him for help.

___
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