Re: boot0cfg

2010-08-17 Thread Konrad Heuer


On Tue, 17 Aug 2010, Dick Hoogendijk wrote:


I dumped/restored the system to ad8 yesterday and booted from it.
The system *did* boot but (alas) the /dev/ads1a(f) slices were mounted. So, 
the system loaded the *old* root partitions (from the first drive). After 
googling and reading I think I need *boot0cfg* but I'm a bit scary to ruin my 
new boot (ad8) drive.


So, what is the exact syntax to make my system not only boot from ad8, but 
also mount the /deb/ad8s1 slice as root slice?


I'd try to set

rootdev="disk8s1a"

in /boot/loader.conf in /dev/ad8s1a since boot loader and kernel seem to 
be read from there.


Before editing, please interrupt the boot sequence into command prompt 
mode and enter the command "lsdev" to have a look how the disks are 
enumerated by the boot loader.


Best regards

Konrad Heuer
GWDG, Am Fassberg, 37077 Goettingen, Germany, kheu...@gwdg.de
___
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: boot0cfg, how to use -m option

2009-10-23 Thread Warren Block

On Sat, 24 Oct 2009, Sandra Kachelmann wrote:


I installed the FreeBSD boot loader and have now the following options:

F1  Win
F2  Win
F3  FreeBSD
F4  FreeBSD

F6  PXE

Now I wan't to enable only partition 1 and 3 and PXE (F1, F3, F6).

The manpage of boot0cfg says:

-m mask
   Specify slices to be enabled/disabled, where mask is an integer
between 0 (no slices enabled) and 0xf (all four slices enabled).

which I find very confusing.

Could someone explain me what value (and why?) I have to chose to
achieve the above mentioned.


I can't say I've used that, but it appears to just be bit values.  They 
should be:


PartitionMask bit value
11
22
34
48

Add together the ones you need.  For partitions 1 and 3, it would be 
1+4, so... 5.  I don't know if boot0cfg wants that as a plain decimal or 
the leading 0x of a hex format, and the man page doesn't explicitly say. 
It implies hex, but I suspect it wants decimal.  Again, untested.


-Warren Block * Rapid City, South Dakota USA
___
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: "boot0cfg: read /dev/ad1: Input/output error" using nanobsd

2009-02-15 Thread Luke Dean


I'm running FreeBSD 7.0 on a soekris 4801 with an image built by nanobsd. 
It's a small piece of headless hardware that boots from a compact flash drive 
- no moving parts.


I wanted to update the operating system to 7.1 and install some more packages 
on it, so I built a new image with nanobsd and uploaded it to the second 
partition using nanobsd's updatep2 tool.  The new image mounts fine, but the 
last line of updatep2, "boot0cfg -s 2 -v ${NANO_DRIVE}" fails with the 
message I've quoted in the subject line.


The machine boots fine, but I can't provoke any kind of response from 
boot0cfg except for input/output errors.  I'd like to make the machine start 
booting from the second slice.


Any ideas?


More information...

The number of heads that the "diskinfo" reports is different depending on 
whether the compact flash card is plugged into the soekris box or mounted 
in a USB card reader/writer.


The usb reader/writer reports:
da0
512 # sectorsize
2052513792  # mediasize in bytes (1.9G)
4008816 # mediasize in sectors
249 # Cylinders according to firmware.
255 # Heads according to firmware.
63  # Sectors according to firmware.
The soekris box reports:
ad1
512 # sectorsize
2052513792  # mediasize in bytes (1.9G)
4008816 # mediasize in sectors
3977# Cylinders according to firmware.
16  # Heads according to firmware.
63  # Sectors according to firmware.

This is the same compact flash card.

I gave up on boot0cfg and booting from the second partition, so I took the 
compact flash card out of the soekris box, connected it to my workstation 
with a USB card reader, and wrote a whole new image to it.


Even after doing this, boot0cfg still won't work.  I noticed some new 
messages on the console when I tried "boot0cfg -v ad1":


ata0: FAILURE - non aligned DMA transfer attempted
ad1: setting up DMA failed
boot0cfg: read /dev/ad1: Input/output error

ad1 is attached to ata0, per dmesg:
ad1: 1957MB  at ata0-slave WDMA2

I think this means there is some kind of geometry problem here, but I 
don't know how to fix it.

I'd like to find a solution to this, but it's not critical.
___
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: boot0cfg

2004-05-26 Thread Nathan Kinkade
On Wed, May 26, 2004 at 07:27:17AM -0700, Me wrote:
> Hi,
> I'm sure this has been asked before, but I cant find
> any good info.
> I'm having problems reinstalling the bootloader, i'm
> running 5.2.1, I made it to the fixit console but when
> i type boot0cfg -d da0, i get: I/O error.
> Any Ideas?
> 
> Br,
> 
> Joe

You appear to have the commands arguments confused.  Take another look
at the man page.  The -d option specifies a BIOS drive number - you can
usually leave this blank and it will defaul to the first BIOS drive,
which is generally correct for most setups.  You probably want a command
more like:

# boot0cfg -Bv da0

There are other useful options, such as setting the delay and setting
the default partition/disk to boot.  I myself usually use the command:

# boot0cfg -Bv -o noupdate -t 50 

Nathan


pgpQzbQGUscCB.pgp
Description: PGP signature


Re: boot0cfg?

2003-03-18 Thread Jud
On Tue, 18 Mar 2003 12:31:18 +0200 (EET), Andrey Simonenko 
<[EMAIL PROTECTED]> wrote:

On Tue, 18 Mar 2003 08:55:24 + (UTC) in lucky.freebsd.questions, 
Henrik Hudson wrote:

I read the man page for boot0cfg and although that seems to be able to 
install boot0 into various places, it doesn't seem to let one modify 
what boot0 displays???

You should modify source file.  Look at /sys/boot/i386/boot0/boot0.s
(for i386).  I'm not sure that there is free space in boot0, check this.
If there is free space in boot0, then you can modify it.
If boot0 doesn't have free space, then you can remove some file
system names from boot0.s and add names you need.
You should make modification of boot0 code very _carefully_ and test
boot0 with the _floppy_.  And double check that boot0 actually can't
understand your file system, check if boot0.s doesn't have partition id
in tables: (look at the end of boot0.s).
If you don't want to play with source files, try /usr/ports/sysutils/grub.  
It is excellent (though it doesn't grok booting from RAID volumes except in 
limited circumstances) and very configurable, but read the documentation 
very carefully.  I am not a fan of GNU info pages; if you aren't either, 
you may want to take a look at the online documentation at the Grub website 
before installing it.

BTW, it isn't that boot0 doesn't understand the Windows filesystems, it's 
that the same basic filesystems are used by other OSs as well as multiple 
versions of Windows, and boot0 doesn't have room for all the possible 
names.  (Bootloaders with menus, like the NT/2K/XP bootloader or Grub, do 
the menuing outside the bootloader code.)

Jud



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message


Re: boot0cfg?

2003-03-18 Thread Andrey Simonenko
On Tue, 18 Mar 2003 08:55:24 + (UTC) in lucky.freebsd.questions, Henrik Hudson 
wrote:

> 
> I read the man page for boot0cfg and although that seems to be able to install 
> boot0 into various places, it doesn't seem to let one modify what boot0 
> displays???
> 

You should modify source file.  Look at /sys/boot/i386/boot0/boot0.s
(for i386).  I'm not sure that there is free space in boot0, check this.
If there is free space in boot0, then you can modify it.

If boot0 doesn't have free space, then you can remove some file
system names from boot0.s and add names you need.

You should make modification of boot0 code very _carefully_ and test
boot0 with the _floppy_.  And double check that boot0 actually can't
understand your file system, check if boot0.s doesn't have partition id
in tables: (look at the end of boot0.s).

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message