Thomas Mueller
2013-Aug-11 17:31 UTC
Change in loader or kernel: won't boot with kfreebsd in grub2
Has there been a change in loader or kernel format recently? Through FreeBSD 9.1 postrelease, I was able to boot with grub2 (Super Grub Disk) on the System Rescue CD (sysresccd.org) by set root=(hd0,gpt3) insmod ufs2 kfreebsd /boot/loader boot but that no longer works. That was the method suggested in $PORTSDIR/sysutils/grub2/pkg-message I just source-upgraded from 9.2-BETA2 to what is now called 9.2-PRERELEASE uname -a shows FreeBSD amelia2 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #17 r254196: Sun Aug 11 00:36:49 UTC 2013 root at amelia2:/usr/obj/usr/src/sys/SANDY amd64 Fortunately, I also installed to a USB stick, GPT-partitioned with the first partition being freebsd-boot, so I boot with that, and to get the hard-drive installation, escape to loader prompt and type set boot_askname and then ufs:/dev/ada0p3 at the mountroot> prompt. I want to use the hard drive for more than one OS: FreeBSD and Linux. For forensic, testing purposes, I tested and was able to boot the old 9.0-BETA1 installation by set root=(hd0,gpt9) insmod ufs2 kfreebsd /boot/loader boot which is why I think there was possibly a change in loader or kernel format. I was worried that my Western Digital Caviar Green 3 TB hard drive was starting to go bad, but now it looks like maybe a change in FreeBSD loader or kernel format. Tom
Juergen Lock
2013-Aug-11 23:10 UTC
Change in loader or kernel: won't boot with kfreebsd in grub2
On Sun, Aug 11, 2013 at 05:31:10PM +0000, Thomas Mueller wrote:> Has there been a change in loader or kernel format recently? > > Through FreeBSD 9.1 postrelease, I was able to boot with grub2 (Super Grub Disk) on the System Rescue CD (sysresccd.org) by > > set root=(hd0,gpt3) > insmod ufs2 > kfreebsd /boot/loader > boot > > but that no longer works. > > That was the method suggested in $PORTSDIR/sysutils/grub2/pkg-message > > I just source-upgraded from 9.2-BETA2 to what is now called 9.2-PRERELEASE > > uname -a shows > > > FreeBSD amelia2 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #17 r254196: Sun Aug 11 00:36:49 UTC 2013 root at amelia2:/usr/obj/usr/src/sys/SANDY amd64 > > Fortunately, I also installed to a USB stick, GPT-partitioned with the first partition being freebsd-boot, so I boot with that, and to get the hard-drive installation, escape to loader prompt and type > > set boot_askname > > and then ufs:/dev/ada0p3 > > at the mountroot> prompt. > > I want to use the hard drive for more than one OS: FreeBSD and Linux. > > For forensic, testing purposes, I tested and was able to boot the old 9.0-BETA1 installation by > > set root=(hd0,gpt9) > insmod ufs2 > kfreebsd /boot/loader > boot > > which is why I think there was possibly a change in loader or kernel format. > > I was worried that my Western Digital Caviar Green 3 TB hard drive was starting to go bad, but now it looks like maybe a change in FreeBSD loader or kernel format. >Hmm I just tested super_grub2_disk_hybrid_2.00s1-beta5.iso from http://www.supergrubdisk.org/category/download/supergrub2diskdownload/ if it can boot FreeBSD-9.2-RC1-amd64-memstick.img in qemu and I had to fix "kfreebsd" spelled as "freebsd" and "kfreebsd_loadenv" spelled as "frebsd_loadenv", replace /boot/kernel/kernel with /boot/loader, and I in the loader I then had to set currdev=disk1a (shown by lsdev) and load /boot/kernel/kernel. qemu was started like this: qemu-system-x86_64 -cdrom super_grub2_disk_hybrid_2.00s1-beta5.iso -hda FreeBSD-9.2-RC1-amd64-memstick.img -m 512 -boot d -monitor stdio Letting super_grub2_disk_hybrid_2.00s1-beta5.iso boot the kernel directly via kfreebsd /boot/kernel/kernel fails tho because of a this bug in the vanilla grub 2.00 code: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=699002 (The fix for that bug now is in our sysutils/grub2 port as well as in debian's grub 2.00 but apparently not yet in the super grub disk isos.) So maybe your problem is that loader needs currdev set at least in this case and in your old 9.0 installation it didn't? HTH, :) Juergen
Thomas Mueller
2013-Aug-12 15:39 UTC
Change in loader or kernel: won't boot with kfreebsd in grub2
> Hmm I just tested super_grub2_disk_hybrid_2.00s1-beta5.iso from> http://www.supergrubdisk.org/category/download/supergrub2diskdownload/> if it can boot FreeBSD-9.2-RC1-amd64-memstick.img in qemu and I > had to fix "kfreebsd" spelled as "freebsd" and "kfreebsd_loadenv" > spelled as "frebsd_loadenv", replace /boot/kernel/kernel with > /boot/loader, and I in the loader I then had to set currdev=disk1a > (shown by lsdev) and load /boot/kernel/kernel. qemu was started > like this:> qemu-system-x86_64 -cdrom super_grub2_disk_hybrid_2.00s1-beta5.iso -hda FreeBSD-9.2-RC1-amd64-memstick.img -m 512 -boot d -monitor stdio> Letting super_grub2_disk_hybrid_2.00s1-beta5.iso boot the kernel > directly via kfreebsd /boot/kernel/kernel fails tho because of a this > bug in the vanilla grub 2.00 code:> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=699002> (The fix for that bug now is in our sysutils/grub2 port as well as > in debian's grub 2.00 but apparently not yet in the super grub disk > isos.)> So maybe your problem is that loader needs currdev set at least > in this case and in your old 9.0 installation it didn't?HTH, :)> JuergenI still wonder why Super Grub Disk kfreebsd worked until recently. I figure something must have changed in FreeBSD loader or kernel structure since the Super Grub Disk didn't change in that time. For currdev, apparently the big hard drive is just recognized as one big drive with no reference to partitions (lsdev). I could try building grub2 from ports on both the hard-drive installation and the USB-stick amd64 installation, see what possibilities are then available. FreeBSD gpart can create a boot partition, but then the question is how to boot that when there is more than one OS partition. I can't simply put the FreeBSD boot partition at the start of the hard drive as I did with the USB sticks. I had a FreeDOS installation with syslinux on a USB stick that went bad (the USB stick hardware). That would permit me to have various boot images including grub4dos and Super Grub Disk to boot with syslinux without booting into FreeDOS. I'd re-create that, but the FreeDOS installer has proven tricky. Tom
Thomas Mueller
2013-Aug-14 01:41 UTC
Change in loader or kernel: won't boot with kfreebsd in grub2
> On 12.08.2013 19:39, Thomas Mueller wrote: > > I still wonder why Super Grub Disk kfreebsd worked until recently.> > I figure something must have changed in FreeBSD loader or kernel > > structure since the Super Grub Disk didn't change in that time. > > > For currdev, apparently the big hard drive is just recognized as one > > big drive with no reference to partitions (lsdev).> Can you obtain the following information and send it to me?> 1. lsdev output from the loader that works > 2. gpart list from booted system > 3. lsdev output from the loader that doesn't work--> WBR, Andrey V. ElsukovI can provide the gpart list from booted system, but how do I capture lsdev output without copying by pencil and paper? I looked in "man loader" and "man loader.conf". I subsequently added some partitions (6,7,12,13,14) for Linux purposes, but that should have no current effect on booting FreeBSD. gpart show ada0 shows => 34 5860533101 ada0 GPT (2.7T) 34 491520 1 efi (240M) 491554 16000000 2 linux-data (7.6G) 16491554 6 - free - (3.0k) 16491560 295768568 3 freebsd-ufs (141G) 312260128 2 - free - (1.0k) 312260130 128 8 freebsd-boot (64k) 312260258 209715200 9 freebsd-ufs (100G) 521975458 356515840 11 freebsd-ufs (170G) 878491298 6 - free - (3.0k) 878491304 41943040 4 netbsd-ffs (20G) 920434344 8388608 5 netbsd-swap (4.0G) 928822952 41943040 6 !0fc63daf-8483-4772-8e79-3d69d8477de4 (20G) 970765992 16777216 7 linux-swap (8.0G) 987543208 41943040 12 !0fc63daf-8483-4772-8e79-3d69d8477de4 (20G) 1029486248 209715200 13 !0fc63daf-8483-4772-8e79-3d69d8477de4 (100G) 1239201448 419430400 14 !0fc63daf-8483-4772-8e79-3d69d8477de4 (200G) 1658631848 4192206714 - free - (2T) 5850838562 8388608 10 freebsd-swap (4.0G) 5859227170 1305965 - free - (637M) gpart show -l ada0 shows => 34 5860533101 ada0 GPT (2.7T) 34 491520 1 WDGreen001 (240M) 491554 16000000 2 WDGreen002 (7.6G) 16491554 6 - free - (3.0k) 16491560 295768568 3 WDGreen003 (141G) 312260128 2 - free - (1.0k) 312260130 128 8 WDGreen008 (64k) 312260258 209715200 9 WDGreen009 (100G) 521975458 356515840 11 WDGreen011 (170G) 878491298 6 - free - (3.0k) 878491304 41943040 4 WDGreen004 (20G) 920434344 8388608 5 WDGreen005 (4.0G) 928822952 41943040 6 WDGreen006 (20G) 970765992 16777216 7 WDGreen007 (8.0G) 987543208 41943040 12 WDGreen012 (20G) 1029486248 209715200 13 WDGreen013 (100G) 1239201448 419430400 14 WDGreen014 (200G) 1658631848 4192206714 - free - (2T) 5850838562 8388608 10 WDGreen010 (4.0G) 5859227170 1305965 - free - (637M) For the USB stick, gpart show da1 shows => 34 15240509 da1 GPT (7.3G) 34 128 1 freebsd-boot (64k) 162 13200000 2 freebsd-ufs (6.3G) 13200162 2040380 3 freebsd-swap (996M) 15240542 1 - free - (512B) or with labels, gpart show -l da1 shows => 34 15240509 da1 GPT (7.3G) 34 128 1 usb64boot (64k) 162 13200000 2 usb64root (6.3G) 13200162 2040380 3 usb64swap (996M) 15240542 1 - free - (512B) Tom
Thomas Mueller
2013-Aug-14 03:22 UTC
Change in loader or kernel: won't boot with kfreebsd in grub2
> > I can provide the gpart list from booted system, but how do I capture > > lsdev output without copying by pencil and paper?> You can just make a photo.> > I looked in "man loader" and "man loader.conf". > > > I subsequently added some partitions (6,7,12,13,14) for Linux > > purposes, but that should have no current effect on booting FreeBSD.> An output of `gpart show` contains less information that `gpart list`, > it is useless for me :)--> WBR, Andrey V. ElsukovHow do I make a photo when I don't have a digital camera? If I had a digital camera, how would I convert the picture to text? I looked at "man gpart" and didn't see "list" in the list of commands: a little deficiency in the man page. Geom name: da0 modified: false state: OK fwheads: 255 fwsectors: 63 last: 732558330 first: 6 entries: 128 scheme: GPT Providers: 1. Name: da0p1 Mediasize: 209715200 (200M) Sectorsize: 4096 Stripesize: 0 Stripeoffset: 1048576 Mode: r0w0e0 rawuuid: de838bc6-0456-46f8-a277-3a627846685f rawtype: c12a7328-f81f-11d2-ba4b-00a0c93ec93b label: MyBook1 length: 209715200 offset: 1048576 type: efi index: 1 end: 51455 start: 256 2. Name: da0p2 Mediasize: 8074035200 (7.5G) Sectorsize: 4096 Stripesize: 0 Stripeoffset: 210763776 Mode: r0w0e0 rawuuid: 1fb90c07-1939-4a80-9e03-c47470f4f555 rawtype: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 label: MyBook2 length: 8074035200 offset: 210763776 type: linux-data index: 2 end: 2022655 start: 51456 3. Name: da0p3 Mediasize: 524288 (512k) Sectorsize: 4096 Stripesize: 0 Stripeoffset: 3989831680 Mode: r0w0e0 rawuuid: 497d10d1-e7ec-4b50-ab0d-77eb5216eae3 rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f label: MyBook3 length: 524288 offset: 8284798976 type: freebsd-boot index: 3 end: 2022783 start: 2022656 4. Name: da0p4 Mediasize: 53687091200 (50G) Sectorsize: 4096 Stripesize: 0 Stripeoffset: 3990880256 Mode: r0w0e0 rawuuid: 1fd5faa9-09cb-40eb-9f9e-90cd2d041016 rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b label: MyBook4 length: 53687091200 offset: 8285847552 type: freebsd-ufs index: 4 end: 15130111 start: 2022912 5. Name: da0p5 Mediasize: 4294967296 (4.0G) Sectorsize: 4096 Stripesize: 0 Stripeoffset: 1843396608 Mode: r0w0e0 rawuuid: 344e66cb-a1be-4562-be82-1350d93d2da2 rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b label: MyBook5 length: 4294967296 offset: 61972938752 type: freebsd-swap index: 5 end: 16178687 start: 15130112 6. Name: da0p6 Mediasize: 214748364800 (200G) Sectorsize: 4096 Stripesize: 0 Stripeoffset: 1843396608 Mode: r0w0e0 rawuuid: 1e45c5ac-3623-47b1-bc66-98b8b972a0b0 rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b label: MyBook6 length: 214748364800 offset: 66267906048 type: freebsd-ufs index: 6 end: 68607487 start: 16178688 7. Name: da0p7 Mediasize: 53687091200 (50G) Sectorsize: 4096 Stripesize: 0 Stripeoffset: 1843396608 Mode: r0w0e0 rawuuid: e39f40a7-415b-4bad-afac-f981378ccbf7 rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b label: MyBook7 length: 53687091200 offset: 281016270848 type: freebsd-ufs index: 7 end: 81714687 start: 68607488 Consumers: 1. Name: da0 Mediasize: 3000558944256 (2.7T) Sectorsize: 4096 Mode: r0w0e0 Geom name: da1 modified: false state: OK fwheads: 255 fwsectors: 63 last: 15240542 first: 34 entries: 128 scheme: GPT Providers: 1. Name: da1p1 Mediasize: 65536 (64k) Sectorsize: 512 Stripesize: 0 Stripeoffset: 17408 Mode: r0w0e0 rawuuid: 9fc8a879-75a4-11e1-8b1f-8c89a5131554 rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f label: usb64boot length: 65536 offset: 17408 type: freebsd-boot index: 1 end: 161 start: 34 2. Name: da1p2 Mediasize: 6758400000 (6.3G) Sectorsize: 512 Stripesize: 0 Stripeoffset: 82944 Mode: r0w0e0 rawuuid: c5043e60-75a6-11e1-8b1f-8c89a5131554 rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b label: usb64root length: 6758400000 offset: 82944 type: freebsd-ufs index: 2 end: 13200161 start: 162 3. Name: da1p3 Mediasize: 1044674560 (996M) Sectorsize: 512 Stripesize: 0 Stripeoffset: 2463515648 Mode: r0w0e0 rawuuid: e2540349-75a6-11e1-8b1f-8c89a5131554 rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b label: usb64swap length: 1044674560 offset: 6758482944 type: freebsd-swap index: 3 end: 15240541 start: 13200162 Consumers: 1. Name: da1 Mediasize: 7803174912 (7.3G) Sectorsize: 512 Mode: r0w0e0 Geom name: ada0 modified: false state: OK fwheads: 16 fwsectors: 63 last: 5860533134 first: 34 entries: 128 scheme: GPT Providers: 1. Name: ada0p1 Mediasize: 251658240 (240M) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 1024 Mode: r0w0e0 rawuuid: 44de8f9c-b9d2-11e0-b041-8c89a5131554 rawtype: c12a7328-f81f-11d2-ba4b-00a0c93ec93b label: WDGreen001 length: 251658240 offset: 17408 type: efi index: 1 end: 491553 start: 34 2. Name: ada0p2 Mediasize: 8192000000 (7.6G) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 1024 Mode: r0w0e0 rawuuid: 44de8f9f-b9d2-11e0-b041-8c89a5131554 rawtype: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 label: WDGreen002 length: 8192000000 offset: 251675648 type: linux-data index: 2 end: 16491553 start: 491554 3. Name: ada0p3 Mediasize: 151433506816 (141G) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r1w1e1 rawuuid: e414a2c7-dd11-11e0-a733-8c89a5131554 rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b label: WDGreen003 length: 151433506816 offset: 8443678720 type: freebsd-ufs index: 3 end: 312260127 start: 16491560 4. Name: ada0p4 Mediasize: 21474836480 (20G) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r0w0e0 rawuuid: b96b2869-eeec-42b5-8e18-f49689c21db6 rawtype: 49f48d5a-b10e-11dc-b99b-0019d1879648 label: WDGreen004 length: 21474836480 offset: 449787547648 type: netbsd-ffs index: 4 end: 920434343 start: 878491304 5. Name: ada0p5 Mediasize: 4294967296 (4.0G) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r0w0e0 rawuuid: 5716d94c-50bc-4c95-84e9-8aaa607debdc rawtype: 49f48d32-b10e-11dc-b99b-0019d1879648 label: WDGreen005 length: 4294967296 offset: 471262384128 type: netbsd-swap index: 5 end: 928822951 start: 920434344 6. Name: ada0p6 Mediasize: 21474836480 (20G) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r0w0e0 rawuuid: 5189415d-93c3-482b-a58a-5efb59b85ced rawtype: 0fc63daf-8483-4772-8e79-3d69d8477de4 label: WDGreen006 length: 21474836480 offset: 475557351424 type: !0fc63daf-8483-4772-8e79-3d69d8477de4 index: 6 end: 970765991 start: 928822952 7. Name: ada0p7 Mediasize: 8589934592 (8.0G) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r0w0e0 rawuuid: 984afbf8-af57-4b43-987e-c29072e35600 rawtype: 0657fd6d-a4ab-43c4-84e5-0933c84b4f4f label: WDGreen007 length: 8589934592 offset: 497032187904 type: linux-swap index: 7 end: 987543207 start: 970765992 8. Name: ada0p8 Mediasize: 65536 (64k) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 1024 Mode: r0w0e0 rawuuid: 8a48eee6-c31e-11e0-98dc-8c89a5131554 rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f label: WDGreen008 length: 65536 offset: 159877186560 type: freebsd-boot index: 8 end: 312260257 start: 312260130 9. Name: ada0p9 Mediasize: 107374182400 (100G) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 1024 Mode: r1w1e1 rawuuid: 53268360-c320-11e0-98dc-8c89a5131554 rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b label: WDGreen009 length: 107374182400 offset: 159877252096 type: freebsd-ufs index: 9 end: 521975457 start: 312260258 10. Name: ada0p10 Mediasize: 4294967296 (4.0G) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 1024 Mode: r1w1e0 rawuuid: 8a8a47aa-c31e-11e0-98dc-8c89a5131554 rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b label: WDGreen010 length: 4294967296 offset: 2995629343744 type: freebsd-swap index: 10 end: 5859227169 start: 5850838562 11. Name: ada0p11 Mediasize: 182536110080 (170G) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 1024 Mode: r1w1e1 rawuuid: 77b45a5a-c320-11e0-98dc-8c89a5131554 rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b label: WDGreen011 length: 182536110080 offset: 267251434496 type: freebsd-ufs index: 11 end: 878491297 start: 521975458 12. Name: ada0p12 Mediasize: 21474836480 (20G) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r0w0e0 rawuuid: 7452f294-430c-496a-8520-8495ddc660b8 rawtype: 0fc63daf-8483-4772-8e79-3d69d8477de4 label: WDGreen012 length: 21474836480 offset: 505622122496 type: !0fc63daf-8483-4772-8e79-3d69d8477de4 index: 12 end: 1029486247 start: 987543208 13. Name: ada0p13 Mediasize: 107374182400 (100G) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r0w0e0 rawuuid: bfabd28d-bf84-4f99-84a5-f67ea96f3d3c rawtype: 0fc63daf-8483-4772-8e79-3d69d8477de4 label: WDGreen013 length: 107374182400 offset: 527096958976 type: !0fc63daf-8483-4772-8e79-3d69d8477de4 index: 13 end: 1239201447 start: 1029486248 14. Name: ada0p14 Mediasize: 214748364800 (200G) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r0w0e0 rawuuid: 20b43d00-0a43-419d-9527-d901b6633be8 rawtype: 0fc63daf-8483-4772-8e79-3d69d8477de4 label: WDGreen014 length: 214748364800 offset: 634471141376 type: !0fc63daf-8483-4772-8e79-3d69d8477de4 index: 14 end: 1658631847 start: 1239201448 Consumers: 1. Name: ada0 Mediasize: 3000592982016 (2.7T) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r4w4e7 Geom name: da2 modified: false state: OK fwheads: 255 fwsectors: 63 last: 31277022 first: 34 entries: 128 scheme: GPT Providers: 1. Name: da2p1 Mediasize: 65536 (64k) Sectorsize: 512 Stripesize: 0 Stripeoffset: 17408 Mode: r0w0e0 rawuuid: 5854df54-798d-11e1-b1eb-8c89a5131554 rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f label: usb32boot length: 65536 offset: 17408 type: freebsd-boot index: 1 end: 161 start: 34 2. Name: da2p2 Mediasize: 13958643712 (13G) Sectorsize: 512 Stripesize: 0 Stripeoffset: 82944 Mode: r0w0e0 rawuuid: 2f1ca844-798e-11e1-b1eb-8c89a5131554 rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b label: usb32root length: 13958643712 offset: 82944 type: freebsd-ufs index: 2 end: 27263137 start: 162 3. Name: da2p3 Mediasize: 2055109120 (1.9G) Sectorsize: 512 Stripesize: 0 Stripeoffset: 1073824768 Mode: r0w0e0 rawuuid: 444279bf-798e-11e1-b1eb-8c89a5131554 rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b label: usb32swap length: 2055109120 offset: 13958726656 type: freebsd-swap index: 3 end: 31277022 start: 27263138 Consumers: 1. Name: da2 Mediasize: 16013852672 (14G) Sectorsize: 512 Mode: r0w0e0 -- Tom
Thomas Mueller
2013-Aug-15 03:40 UTC
Change in loader or kernel: won't boot with kfreebsd in grub2
> On 14.08.2013 07:22, Thomas Mueller wrote: > > How do I make a photo when I don't have a digital camera?> > If I had a digital camera, how would I convert the picture to text?> You can attach images to email, or just share somewhere, > e.g. http://imm.io> > I looked at "man gpart" and didn't see "list" in the list of > > commands: a little deficiency in the man page.> This is generic geom's command, it is described in geom(8).--> WBR, Andrey V. ElsukovBut as I said, I don't have a digital camera. In any case, sending a graphic image of what ought to be a small text file is very clumsy and inefficient. There ought to be a way to capture loader-command output to a file. Question is how to do that at the loader level. I will try again later this week or weekend and post what I can of lsdev output. Tom
Thomas Mueller
2013-Aug-15 15:11 UTC
Change in loader or kernel: won't boot with kfreebsd in grub2
> > But as I said, I don't have a digital camera.> > In any case, sending a graphic image of what ought to be a small text file is very clumsy and inefficient.> > There ought to be a way to capture loader-command output to a file. Question is how to do that at the loader level.> Might I humbly suggest a serial console? You can then capture the data as text.> If this is a server, it's rare these days to not have an IP-KVM solution built-in, and even more rare to not have full console to serial redirection from > +the first BIOS screen all the way to the OS grabbing the port.> Or you can borrow someone's cell phone, I can't recall the last time I saw one without a camera.> CharlesThis computer is not a server, and I don't have a serial console. Also, this computer, like most computers these days, has no serial or parallel port, though there is a serial header on the motherboard. Only possible connectivity I have is Ethernet, and possibly I could set up WiFi. I have a land phone but no cell phone, at least not yet: behind the times. Tom
Thomas Mueller
2013-Aug-19 01:40 UTC
Change in loader or kernel: won't boot with kfreebsd in grub2
I finally tried again to track down that booting problem with FreeBSD via Super Grub Disk with kfreebsd. I also tried, unsuccessfully, the menu choice "Detect any operating system". That failed for failure to find commands "freebsd" and "frebsd-loadenv". In the latter command, "frebsd-loadenv" was apparently misspelled; I copy what I saw. When I tried to boot by kfreebsd, I got a prompt (OK) and lsdev produced cd devices: disk devices: disk0 BIOS drive A: disk0s1: Unknown disk1: BIOS drive C: disk2: BIOS drive D: disk2p1: FreeBSD boot disk2p2: FreeBSD UFS disk2p3: FreeBSD swap disk3: BIOS drive E: disk3p1: FreeBSD boot disk3p2: FreeBSD UFS disk3p3: FreeBSD swap pxe devices: OK So I assume disk2 and disk3 are USB sticks, disk1 is Western Digital Caviar Green 3 TB SATA hard drive, and disk0 is Western Digital My Book Essential 3 TB USB 3.0 hard drive, GPT-partitioned. So the loader (?) missed out on disk0 and disk1 I can repeat what uname -a shows: FreeBSD amelia2 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #17 r254196: Sun Aug 11 00:36:49 UTC 2013 root at amelia2:/usr/obj/usr/src/sys/SANDY amd64 Tom
Thomas Mueller
2013-Aug-19 19:30 UTC
Change in loader or kernel: won't boot with kfreebsd in grub2
I can repeat (again) what uname -a shows: FreeBSD amelia2 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #17 r254196: Sun Aug 11 00:36:49 UTC 2013 root at amelia2:/usr/obj/usr/src/sys/SANDY amd64> Hello,> can you try to install this loader?> http://people.freebsd.org/~ae/loader> WBR, Andrey V. ElsukovI just downloaded it, saving as loaderae, using your email username and initials as a suffix. I assume loader works under a different name? I can use "kfreebsd/loaderae" instead of "kfreebsd /boot/loader", and loaderae will be preserved over the next update from source. Then I will want to test the new /boot/loader which might possibly work right with kfreebsd. Or maybe I will have a newer kfreebsd. Tom
Thomas Mueller
2013-Aug-20 01:59 UTC
Change in loader or kernel: won't boot with kfreebsd in grub2
> ..so you probably never saw my post about the updated super grub disk iso:http://lists.freebsd.org/pipermail/freebsd-stable/2013-August/074711.html> I.e. they fixed the kfreebsd misspelling and the grub 2.00 bug that > prevented it from booting a 9.1+ kernel directly, so the autodetection > now has better chances of working. (They even added loader to the > autodetection so you can also `e'dit that entry and change loader to > loaderae to test this.)> HTH, :) > JuergenI remember that message you refer to but thought the bug was not fixed yet in Super Grub Disk. How would I make it into something like a giant floppy image that can be booted from syslinux or isolinux like the Super Grub Disk on the System Rescue CD? I could also try something by building grub2 from FreeBSD ports, don't know just what booting images I can create. Tom
Thomas Mueller
2013-Aug-20 02:58 UTC
Change in loader or kernel: won't boot with kfreebsd in grub2
I can repeat (again) what uname -a shows: FreeBSD amelia2 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #17 r254196: Sun Aug 11 00:36:49 UTC 2013 root at amelia2:/usr/obj/usr/src/sys/SANDY amd64> Hello,> can you try to install this loader?> http://people.freebsd.org/~ae/loader> WBR, Andrey V. ElsukovI just downloaded it, saving as loaderae, using your email username and initials as a suffix. I assume loader works under a different name? I can use "kfreebsd/loaderae" instead of "kfreebsd /boot/loader", and loaderae will be preserved over the next update from source. Then I will want to test the new /boot/loader which might possibly work right with kfreebsd. Or maybe I will have a newer kfreebsd. Update: Actually there was a typo above: I meant "kfreebsd /boot/loaderae" and not "kfreebsd/loaderae". Anyway, I tried kfreebsd /boot/loaderae and got the same thing as with kfreebsd /boot/loader was taken to a loader prompt where I could not access any files on the hard disk. So again I had to reboot, this time from the USB stick and at the loader prompt typed set boot_askname Tom
Thomas Mueller
2013-Aug-20 03:42 UTC
Change in loader or kernel: won't boot with kfreebsd in grub2
> On 20.08.2013 06:58, Thomas Mueller wrote: > > was taken to a loader prompt where I could not access any files on > > the hard disk.> Was the output of lsdev command the same or something changed?> > So again I had to reboot, this time from the USB stick and at the > > loader prompt typed set boot_askname> WBR, Andrey V. ElsukovOnly difference in lsdev output was that the USB sticks didn't show, but that was because I had removed them. I reinserted the USB sticks, but they still didn't show, probably because the loader presumably does not recognize newly inserted USB sticks. I then typed "reboot" and successfully rebooted from the appropriate USB stick. Tom
Thomas Mueller
2013-Aug-20 21:54 UTC
Change in loader or kernel: won't boot with kfreebsd in grub2
This is what /cdrom/isolinux/isolinux.cfg shows for Super Grub2 Disk entry: LABEL grubdisk MENU LABEL SGD: Super Grub2 Disk kernel memdisk append initrd=/bootdisk/grubdisk.img floppy raw This is from the latest SysRescCD beta. Now I wonder how or if one can access a CD or DVD from GRUB2. GRUB2 has (hd0) (hd1) (fd0) but no (cd) or (cd0). I also wonder how or if one can boot a FreeBSD partition from GRUB2 or syslinux. Tom
Thomas Mueller
2013-Aug-22 02:41 UTC
Change in loader or kernel: won't boot with kfreebsd in grub2
> Not sure about a physical cd but booting an iso should be possible > using either memdisk from grub2 like in the posting I linked,> http://ubuntuforums.org/showthread.php?t=1549847&page=13&p=10818457#post10818457> _or_ also using grub2's own loopback command like described here:> http://michael-prokop.at/blog/2009/05/25/boot-an-iso-via-grub2/> (but btw the super grub disk iso should also boot directly when dd'd > to an usb key, not only when burned to a cd/dvd.)> It could only be that the partition table on your disk is somehow > messed up/has leftover data from a previous install that confused > loader and might confuse grub2 too so that it doesn't find the > FreeBSD install...> > I also wonder how or if one can boot a FreeBSD partition from GRUB2 or syslinux. > > That's what super grub disk's autodetection should now detect > correctly, if you want to write a grub.cfg entry manually (or type > it live from a grub2 rescue shell) an example is also here:> http://forums.freebsd.org/showthread.php?p=85122#post85122> but note as I said before if you want to boot a 9.1+ kernel directly > w/o loader you need a grub 2.00 version that has the patch mentioned > here: (that's now in debian and in FreeBSD ports but might not be > in other grub2 versions floating around)> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=699002> Tom >HTH, :)> JuergenI tried to boot the FreeBSD partition directly from Super Grub2 Disk with chainloader +1, but was not successful. I think some FreeBSD boot code is in a small boot partition such as I have on the USB-stick installations, installed with gpart. I wonder if "linux16 memdisk" from grub2 is the same as "KERNEL memdisk" in syslinux: was planning to try it on FreeDOS 1.1 installation fd11src.iso . I also have a memdisk in the latest syslinux installed from FreeBSD ports. Once FreeBSD boots from the USB stick, it accesses the GPT partitions OK as far as I can tell. I could even check with a USB-stick installation of NetBSD, though NetBSD is much less stable than FreeBSD on my modern hardware. I was even thinking of making a giant floppy image, not to write to an actual disk, but to boot via grub2 or possibly grub4dos. I would copy /boot but not including the modules to another directory, apply makefs, mdconfig, mount this image, and bsdlabel. I did something like that with NetBSD 5.1_STABLE i386, and it worked with grub4dos. I would of course have to interrupt the boot to be able to specify the root file system, as I did with NetBSD, or maybe put into loader.conf . map --mem --heads=16 --sectors-per-track=63 (hd0,2)/boot2/nbffs51c.img (fd0) map --hook rootnoverify (fd0) chainloader (fd0)+1 boot and hit the spacebar in time to get the boot menu, so I coulld type boot netbsd -a to specify the root file system, or I could boot any other kernel present in the 40 MB "floppy" image. Grub4dos, being born from DOS, requires setting a (fictitious here) disk geometry. Tom
Thomas Mueller
2013-Aug-24 04:30 UTC
Change in loader or kernel: won't boot with kfreebsd in grub2
I could see what happens if I try to boot the FreeBSD boot partition on the hard drive using the Super Grub Disk with chainloader. If that works, it would boot FreeBSD 9.0-BETA1, but I would see if it works. I could also try kfreebsd /boot/kernel/kernel On my hard-drive installation, I have a lot of ports to rebuild, and then get to sysutils/grub2: see UPDATING. But I could also build grub2 on my USB-stick installation. I really need either a successful FreeDOS 1.1 installation on USB stick, or SysRescCD installation on USB stick, largely because either of these boot via syslinux, and then I can add things to syslinux.cfg and bootdisk. The only MBR installation of FreeBSD that I have is 8.2 RELEASE on the old computer, which I intend to recycle in very near future, though I plan to save the hard drives (IDE/PATA). Tom
Thomas Mueller
2013-Aug-25 03:53 UTC
Change in loader or kernel: won't boot with kfreebsd in grub2
Some updates: I could see what happens if I try to boot the FreeBSD boot partition on the hard drive using the Super Grub Disk with chainloader. If that works, it would boot FreeBSD 9.0-BETA1, but I would see if it works. That failed (invalid signature). I could also try kfreebsd /boot/kernel/kernel That failed to boot the proper partition, went to the debugger (db>), whereupon all I could type was "reboot". Now can I safely install boot into the partition to be booted, as I did with NetBSD on USB stick? gpart -p /boot/boot -i 3 That would be for /dev/ada0p3, but I am afraid of damaging something. Tom
Thomas Mueller
2013-Aug-25 22:35 UTC
Change in loader or kernel: won't boot with kfreebsd in grub2
> On Sat, Aug 24, 2013 at 08:53:31PM -0700, Thomas Mueller wrote: > > Some updates:> > I could see what happens if I try to boot the FreeBSD boot partition on the hard drive using the Super Grub Disk with chainloader.> > If that works, it would boot FreeBSD 9.0-BETA1, but I would see if it works.> > That failed (invalid signature).> You probably need to chainload a freebsd-boot partition, _if_ you > want to chainload at all.I was trying to chainload the freebsd-boot partition! But grub2 didn't like it.> > I could also try > > kfreebsd /boot/kernel/kernel> > That failed to boot the proper partition, went to the debugger (db>), whereupon all I could type was "reboot".> You didn't get a mountroot prompt? If you did you can try typing a > question mark and return, that should list possible partitions to mount > root from. If you didn't, or you don't want to do this manually you > need to set kFreeBSD.vfs.root.mountfrom=ufs:/dev/ada0p1 from grub2, > or wherever your root partition is.I remember pressing a key, but then the system rushed past the mountroot prompt into the debugger prompt.> > Now can I safely install boot into the partition to be booted, as I did with NetBSD on USB stick?> > gpart -p /boot/boot -i 3> > That would be for /dev/ada0p3, but I am afraid of damaging something.> That would need to be on a freebsd-boot partition, and you want > /boot/gptboot not /boot/boot.I believe bsdlabel can be used to install boot code to a partition, but believe that is not for GPT. I could try bsdlabel on a giant floppy image as I used installboot on a giant floppy image for NetBSD.> Tom> HTH, > JuergenTom