a5cd
![]() |
|
|
|
|
|||||||
| Embedded Having questions related to ARM/MIPS devices which are not desktops and which usually serve a single purpose such as routers, switches, PDAs, etc? |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hello,
I have a somewhat silly problem but I cannot find the answer alone ![]() I tried to upload a new firmware to a nanobsd box (with $ boot0cfg -s 3 -m 6 ad0completely messes with the running system, most read/write operation will fail with errors and even with "reboot", it is pretty scary so I did some search and found out that boot0cfg was more or less deprecated in favor of gpart, is that correct? I found what I think to be the equivalent of my boot0cfg line with gpart to be: Code:
gpart bootcode -b /boot/mbr ad0 $ gpart bootcode -b /boot/boot ad0s3 $ gpart set -a active -i 3 ad0 Here is the gpart show ad0 output: (partition 1 is unused and can be ignored, partition 2 is the one the system runs on) Code:
=> 63 7372449 ad0 MBR (3.5G)
63 945 1 freebsd (473K)
1008 306432 2 freebsd (150M)
307440 306432 3 freebsd [active] (150M)
613872 4032 4 freebsd (2.0M)
617904 6754608 - free - (3.2G)
=> 0 945 ad0s1 BSD (473K)
0 16 - free - (8.0K)
16 929 1 !0 (465K)
=> 0 306432 ad0s2 BSD (150M)
0 16 - free - (8.0K)
16 306416 1 !0 (150M)
=> 0 306432 ad0s3 BSD (150M)
0 16 - free - (8.0K)
16 306416 1 !0 (150M)
=> 0 4032 ad0s4 BSD (2.0M)
0 16 - free - (8.0K)
16 4016 1 !0 (2.0M)
![]() PS: boot0cfg still seems to work after managing to force a reboot (init 6) but I would prefer avoiding it considering the errors it causes. Last edited by DutchDaemon; October 7th, 2010 at 13:24. Reason: It's "FreeBSD', pal. |
|
#2
|
|||
|
|||
|
You can't just change which partition the boot loader chains to. You also need to update fstab.
You should also not use /boot/mbr as your boot manager because that will prevent you from manually falling back to the previous system via the serial console. Use boot0 rather - it follows the active partition flag too. You can find my update script at misc/145961. |
| The Following User Says Thank You to aragon For This Useful Post: | ||
schmurfy (October 22nd, 2010) | ||
|
#3
|
|||
|
|||
|
Thanks for your answer, I did not think about not being able to use the serial port console. I will check your script.
Last edited by DutchDaemon; October 22nd, 2010 at 16:57. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| gpart GPT boot loader problem | Paul-LKW | Installing & Upgrading | 1 | May 2nd, 2010 01:22 |
| Nanobsd Problems | embeddedbob | Embedded | 9 | April 24th, 2010 04:18 |
| [Solved] gpart: No such geom | henker | Installing & Upgrading | 3 | April 9th, 2010 22:33 |
| gpart -t freebsd-swap | Erratus | Installing & Upgrading | 1 | March 16th, 2010 01:17 |
| gpt or gpart in sysinstall | juedan | Installing & Upgrading | 1 | December 5th, 2009 22:50 |