Re: "disklabel: Class not found" when editing USB disk



Canonical way to boot FreeBSD by hand, with no tools. Using one slice, one
partition


fdisk -BI /dev/da0
bsdlabel -Bw /dev/da0s1
newfs /dev/da0s1a

Making sure there's a /boot directory with the all important loader
Making sure /boot/kernel/kernel exists


This should boot -- however is pretty pointless without anything else.
init's needed, and everything else to make a full MUM (Multi User Mode)
environment...


Keep note that not only does the MBR need bootable code, so does the
bsdlabel/disklabel


newfs will set the proper fstype in the bsdlabel if it's partition is 'a'



Good luck... and yes, I top posted. (Deal with it, people who don't like
it...)


On Thu, Feb 26, 2009 at 10:30 AM, Michael W. Lucas <
mwlucas@xxxxxxxxxxxxxxxxxxxx> wrote:

Hi,

I'm following Ceri's instructions for getting FreeBSD on a flash
drive. My laptop is a Feb 1 -current, I'm installing FreeBSD 7.1, and
the instructions are for 6.1, so we have all kinds of things that
could be going wrong.

The USB boots with the error:

F1 FreeBSD
F6 PXE
Boot: F1

Not ufs
Not ufs
No /boot/loader

When I investigated the flash's disklabel, I saw:

8 partitions:
# size offset fstype [fsize bsize bps/cpg]
a: 4000106 16 unused 0 0
c: 4000122 0 unused 0 0 # "raw" part, don't
edit

I newfs'd this flash drive and put data on it. The obvious thing to
do is set the disklabel for partition a to 4.2BSD. Even if I have to
reinstall the data, no big deal.

So, run bsdlabel -e /dev/da0s1 and change the disklabel to:

# size offset fstype [fsize bsize bps/cpg]
a: 4000106 16 4.2BSD 0 0
c: 4000122 0 unused 0 0 # "raw" part, don't
edit

Then I get the error:

bsdlabel: Class not found
re-edit the label? [y]:

The same error appears if I try to edit the disklabel off-disk and
restore (-R).

Google tells me that this error is not uncommon, but the only
solutions I saw (loading geom_mbr and setting kern.geom.debugflags=16)
did not help.

Anyone have any suggestions? Or, can anyone tell me I'm running down
the wrong path?

Thanks,
==ml

--
Michael W. Lucas mwlucas@xxxxxxxxxxxxxxxxxxxx, mwlucas@xxxxxxxxxxx
http://www.BlackHelicopters.org/~mwlucas/<http://www.BlackHelicopters.org/%7Emwlucas/>
Latest book: Cisco Routers for the Desperate, 2nd Edition
http://www.CiscoRoutersForTheDesperate.com/
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "
freebsd-questions-unsubscribe@xxxxxxxxxxx"

_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • boot0 screen output with dual-boot of FreeBSD / WinXP
    ... I used FreeBSD to partition the 120Gb drive into roughly "half". ... Of course XP clobbered the boot manager, ... it appears that partition type "7" just isn't a "known" type. ...
    (freebsd-hackers)
  • RE: Changing boot partition ACCOMPLISHED, now INIT problem
    ... I installed a minimum FreeBSD and created a second slice to restore the ... mounted it and restored the backup to that partition. ... key on boot manager It started to boot the FreeBSD of the wrecked machine:) ...
    (freebsd-questions)
  • RE: Changing boot partition - ACCOMPLISHED, now INIT problem :(
    ... I accomplished the restore of a wrecked machine only with a .tar backup from ... I installed a minimum FreeBSD on a new ... the new partition as / ad1s2a). ... I have access to the contents of it if I boot through the minimum SO ...
    (freebsd-questions)
  • Re: bsdlabel partiton c error message on new install
    ... on a newly installed FreeBSD 7.0 system on a dell 1950 server I see the ... following error from bsdlabel. ... :P And should I manually change the partition c to fix the ... The c partition should be equal to the size of the slice it is in. ...
    (freebsd-questions)
  • Dual Booting -- Help Please!
    ... FreeBSD getting 25 gig of my single 40 gig drive. ... Install FreeBSD 5.3-RELEASE ... I choose to install the FreeBSD Boot Manager ... Format first partition as NTFS ...
    (comp.unix.bsd.freebsd.misc)