Re: freebsd bootloader / boot0cfg and multiple disks?
On Mon, Dec 20, 2010 at 1:07 AM, Henrik Hudson wrote: > I'm trying to get the FreeBSD boot loader to to boot off multiple > disks, but I can't seem to get it to see my 3rd disk. > > FreeBSD 8.2-PRE amd64; stock kernel with sound card, ahci and PF added > > disk layout: > ada0: freebsd main install (/, /tmp, /var, /usr, /home, swap) > ada1: freebsd data disk > ada2: win7 with ada2s1 being the "boot" 100MB, ada2s2 and ada2s3 > being partitions > > How can I get boot0cfg to try and boot the 3rd disk, ada2s1? I added the > 3rd > disk after already having the first 2 setup and installed. Normally, > I install Windows first and boot0cfg picks it up fine, but not this > time :) > > The man page shows how to install a boot MBR on a disk and to > reference the slices, but I can't seem to see how to reference a 2nd > or 3rd disk. The default install picks up the 2nd disk (FreeBSD > data), but obviously can't boot from that. So, it does seem to be > able to redirect to other disks. > > I tried doing a boot0cfg -Bv -s 1 ada2, but that seems to just > install a MBR on ada2 and it never gets picked up on ada0 boot menu. > > grub isn't supported on amd64 and grub2 seems to be all "wizards" > and secondary "config" files :( > > Henrik, Did you mark ada0(s1) as bootable? Sounds like you might have missed that and marked the wrong disk/slice as bootable. ___ 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 bootloader / boot0cfg and multiple disks?
I'm trying to get the FreeBSD boot loader to to boot off multiple disks, but I can't seem to get it to see my 3rd disk. FreeBSD 8.2-PRE amd64; stock kernel with sound card, ahci and PF added disk layout: ada0: freebsd main install (/, /tmp, /var, /usr, /home, swap) ada1: freebsd data disk ada2: win7 with ada2s1 being the "boot" 100MB, ada2s2 and ada2s3 being partitions How can I get boot0cfg to try and boot the 3rd disk, ada2s1? I added the 3rd disk after already having the first 2 setup and installed. Normally, I install Windows first and boot0cfg picks it up fine, but not this time :) The man page shows how to install a boot MBR on a disk and to reference the slices, but I can't seem to see how to reference a 2nd or 3rd disk. The default install picks up the 2nd disk (FreeBSD data), but obviously can't boot from that. So, it does seem to be able to redirect to other disks. I tried doing a boot0cfg -Bv -s 1 ada2, but that seems to just install a MBR on ada2 and it never gets picked up on ada0 boot menu. grub isn't supported on amd64 and grub2 seems to be all "wizards" and secondary "config" files :( 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: boot0cfg
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"
boot0cfg
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? Hope to get some answers. ___ 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
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"
boot0cfg, how to use -m option
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. Thanks for any enlightenment. Sandra ___ 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"
Problem with boot0cfg
Hi All, Last week my harddisk was broken and wiped out the slice of FreeBSD 7.1R. I decided to bring back my old harddisk with 3 partitions i.e. Windows ME, Windows 2000 and a free partition. It has a menu for selecting which Windows to boot and I have tested booting them. Then I installed FreeBSD-7.1R (from CD) on the free partition and selected boot manager while installing. After completion and reboot the following options presented. F1DOS F2DOS F3FreeBSD But only F3 (FreeBSD) can boot, both Windows can't boot and just hanged. The following is diagnostic. # boot0cfg -v ad0 # flag start chs type end chs offset size 1 0x00 0: 1: 1 0x0b 1023: 9:63 63 4208967 2 0x00 1023:255:63 0x07 1023: 12:63 4209030 10490445 3 0x80 1023:255:63 0xa5 1023: 15:63 14699475 18983853 version=1.0 drive=0x80 mask=0x7 ticks=182 options=packet,update,nosetdrv default_selection=F3 (Slice 3) Any suggestion would be highly appreciated. Please note that previously I used LILO for boot manager. Now I want to use only FBSD tool but I know very little about boot0cfg. 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: "boot0cfg: read /dev/ad1: Input/output error" using nanobsd
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"
"boot0cfg: read /dev/ad1: Input/output error" using nanobsd
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? ___ 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: I used "boot0cfg" and destroyed the MBR.All labels dissapear! (How I Fixed it)
Hi, I managed to fix the error of all slices being destroyed. My system is up and running. i did not reinstall any programs, just edited the partition table and the labels. It took me 3 days to figure out the exact values, so I post here my findings, in case somebody faces the same problem. The problem was solved using two programs from the fixit disk: fdisk and disklabel. Note that I am using a whole disc dedicated to freebsd. no other partitions exist. This is a short guide of how to fix it: a) boot the computer using the floppy disks and enter the Fixit menu with the fixit disc inserted. b) go to menu Configure->Fdisk and delete all partitions (NOTE: I am using all the disc dedicated to freebsd. No other OS exist. On your situation this may vary). c) On this screen then I pressed [A] - use Entire disc and saw the new automatically calculated sector values (and the offset). d) I pressed CTRL+C to abort this screen. Only the numbers interested me. e) i went to menu and pressed the fixit prompt. I went to fixit prompt. ( I run 'disklabel ad0' and 'disklabel -r ad0' and I noted down some numbers of the fake partitions. Especially I noted the size (in sectors) of itIf this process fails, then you have to repeat the disklabel step after every fdisk commans that follows. Also note the number of fsize,bsize, and bps/cpg). f) I edited the partition table using fdisk. fdisk -u ad0 (ad0 is my first disc) I deleted all (fake) partitions and created one accoring to the numbers that I have extracted from the previous screen. The type was 165 Freebsd. Thus I have created a big slice ad0s1. I edited the slice ad0s1 because I saw that there is a hidden parition on every freebsd system with thse values: fdisk ad0s1 Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: The data for partition 2 is: The data for partition 3 is: The data for partition 4 is: sysid 165,(FreeBSD/NetBSD/386BSD) start 0, size 5 (24 Meg), flag 80 (active) beg: cyl 0/ head 0/ sector 1; end: cyl 1023/ head 255/ sector 63 I do not know why, but every freebsd system (on my possesion) has a partition 4 on slice 1 with these values. I then edit the labels on that slice using disklabel -e ad0s1 If that operation fails then you have to install a fresh disklabel using disklabel -w ad0s1 auto or disklabel -w ad0 auto I edit the labels of that slice. The sectors off-set was known from a previous step where I had extracted them using disklabel. The offset is calulated by adding the sectors until know. The fsize and other numbers are known from the previous step also. Then you edit the label and write the first line of a: offset=0 4.2BSD fsize bsize bps/cpg On the b label put in the offset the sectors size of the previous ( a slice) and repeat the process. Note that the label 'c' correspongs to whole disc so this value shoule have size from offset 0 until size the number of disklabel: [sectors/unit: X]. The lats label starts from the sum of all the previous labels until the number of sectors/units. Thus if the calulcated offset it 100 and sectors/unit is 300, then the last label will have size 200 and offset 100. After editing the label, try to mount. Note that the /mnt2/ holds the devices for mounting labels. try to: mount /mnt2/dev/ad0s1a /mnt if this succeeds then label a has correct values. If not try to edit disklabel with oteher numbers. Remember that as long as you do no issue [newfs] the inode table is somewhere hidden on the disc and you just have to figure out the label information (where it starts and where it ends for every slice). Finally, install bootblocks using fdisk -B ad0 fdisk -B ad0s1 disklabel -B ad0 auto disklabel -B ad0s1 auto and to be 100% sure enter sysinstall and go to fdisk menu and press Q quit. it will then ask you to install a boot manager...Say yes to it and your PC is 100% ready! Reboot and enjoy:) it took me 3 days to figure out this process but I managed to succeed in it. Of course the best advice is (in order to avoid this) to print the partitoin information for your hard disc so you know before hand all the values... Just issue (in case you have a ad0 disc) fdisk ad0 [depending on your disc] fdisk ad0s1 [-<<-] disklabel ad0 disklabel ad0s1 i hope that you will not need my short guide on fixing such kind of problems, but your never know :) BB --- Dreams have no limits! ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
I used "boot0cfg" and destroyed the MBR.All labels dissapear!
Dear, Please help me with this strange situation, that is due to using boot0cfg with wrong switches. I googled it but I did not find any similar case. On a working 4.11 freebsd system I wanted to create a floppy bootable disk. This system had one slice and four labels. I run this command: boot0cfg -B -o update -s 1 -t 20 fd0 After I run this command I rebooted and I faced a situation where a) the floppy booting only showed F1 ??? F2 ??? F3 ??? F4 ??? (whatever I pressed it causes to beep and nothing happens) b) I removed the floppy disk and booted from the hard disc, but the same list appeared..and nothing happened. c) I boot with the 2 kernel/mfsroot diskcs with fixit also and I saw: fdisk from the 'sysinstall' shows that no slices exist, and all the space is unused. fdisk ad0 shows that there are 4 partitions with information like == sysid 32 (uknown) 1919950958, 544437093 (265838 Meg) (flag 0x80 active) beggining: cylinder 356 head 97 sector 46 end: cyllinder 357 head 116 secotr 40 sysid 107 (unknown) sysid 83 (unknown) ... sysid 73 (unknown) ... Meanwhile I got the message "slice ad0s1 starts beyong end of the disk: rejecting it" "slice ad0s2 ..rejecting it" "slice ad0s3 rejecting it" "slice ad0s4 ... rejecting it" It seems that all the labels of the single slice have become seperated slices. As a result I cannot mount anything and it seems that all my data is inaccessible. because this is my home freeBSD firewall and I would like to bring it back online without reinstalling and setting it up from the beggining (no backups sniff:( ) how can I fix this? If I recreate partitions (how?) without erasing the file/inode table? how can I change the type of every partition to be freebsd? And how can i change the slices to be one big slice? I think disklabel can help but I am not sure how. How can I save/backup the data on the disk? Thank you very much in advance!!! Please if you have any hint of where to search or what to do help me and I will post the results (and hopefully the solution) of this case as a reference. regards, BB --- Dreams have no limits! ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: boot0cfg
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
boot0cfg
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 __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: boot0cfg?
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?
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
boot0cfg?
Hey List- Somewhat in reference to the previous dual-boot question..I'm trying to figure out how to modify the boot0 to I can change the F1 to something like: F1 Windows or whatever :) 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??? Thanks. Henrik -- Henrik Hudson [EMAIL PROTECTED] You know, Hobbes, some days even my lucky rocket ship underpants don't help." Calvin To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
boot0cfg & fixit.flp
I feel that the boot0cfg command (and its sister fdisk command) should prompt the user "Are you booted up to the hard disk [NOT RECOMMENDED] or to media?!" and further ought to instruct the user to insert a floppy disk to back up the current MBR. That way you'd have something of an "undo" scheme. :( {By the way, nobody commented on my fixit.flp suggestions...} -- Peter Leftwich President & Founder Video2Video Services Box 13692, La Jolla, CA, 92039 USA +1-413-403-9555 To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message