Date: Mon, 24 Aug 2009 12:40:06 -0600 From: Tim Judd <tajudd@gmail.com> To: Roland Smith <rsmith@xs4all.nl> Cc: PJ <af.gourmet@videotron.ca>, freebsd-questions@freebsd.org Subject: Re: moving a disk Message-ID: <ade45ae90908241140s4ad214a2r79641a280e8e769@mail.gmail.com> In-Reply-To: <20090824174937.GA43410@slackbox.xs4all.nl> References: <4A929241.5060406@videotron.ca> <4A92B6C4.8070309@videotron.ca> <20090824174937.GA43410@slackbox.xs4all.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
On 8/24/09, Roland Smith <rsmith@xs4all.nl> wrote: > On Mon, Aug 24, 2009 at 11:50:28AM -0400, PJ wrote: >> PJ wrote: >> > I am trying to move a 7.2 installation to another computer where it is >> > to be the only OS acting as a server for the lan. >> > On bootup I get the message: >> > Using drive 0, partition 3. >> > And there it hangs. > > Probably because the boot code can't find the 3rd stage loader... It is > strange that it is trying partition 3 instead of partition 4. 0-based. OpenBSD when set to install and use all of a disk, sets it to the last primary partition (1-based =3D 4, 0-based =3D 3). > > Did you prepare the disk as explained in the handbook (=A716.3 "Adding > Disks")? > I get the impression that you didn't. And that can have caused the proble= m. > > Try booting again, and press any key to interrupt the boot process to get= to > the boot prompt. You should see something like: > > >> FreeBSD/i386 BOOT > Default: 0:ad(0,a)/boot/loader > boot: > > At this boot prompt, type > > 0:ad(0,4,a)/boot/loader<ENTER> > > This will try to boot from the 4th partition. See boot(8). N.B. the boot > manpage uses the term 'slice' for partitions. By default the boot code lo= oks > for either the active slice or the first slice with the freebsd type. This drive still is likely having OpenBSD bootblocks in the MBR and track. I don't expect OpenBSD to boot FreeBSD. > >> > I have tried to rewrite the mbr but that did absolutely nothing. > > That is not surprising, The mbr is only part of the boot process. The > problem > seems to be that it cannot locate the rest... Read the chapter "The FreeB= SD > Booting Process" from the FreeBSD Handbook. And see > http://en.wikipedia.org/wiki/Master_boot_record > > This will provide insight into how FreeBSD actually boots. It is a bit of= a > convoluted process due to historical restrictions of the PC > architecture. Reading the manual pages for fdisk(8), boot(8) and loader(8= ) > might also prove enlightening. > >> > fik ad0 returns: >> > partitions 1,2,3 are <UNUSED> >> > Parrtition 4 give the cylinder, heads, sectors, blocks stuff > > Why did you install on partition 4? Normally one would use parition 1. and sysinstall would use (0-based =3D 0, 1-based =3D 1) the first partition= too. > >> > What should I do? And what information do I need to supply or look for >> > to solve this. > > See below. > >> > I'd rathernot go through another installation even if this is farly >> > elementary. > > With any luck you don't have to. > >> > Oh, yes... all my former problems were definitely software related as = I >> > have checked and double, triple checked my HDDs and cannot find any >> > problems therewith. > >> here is what I have found in looking at the disk when it's mounted >> on another FBSD system through an USB interface: >> it is mounted on /dev/ad0 >> fdisk ad0 ---> returns partitions 1,2,3 as <UNUSED>; partition 4 is >> marked for sysid 166 OpenBSD (this seems to be left over from an >> installation that was never completed) > > It should be type 165 for FreeBSD! _Or_ partition 4 should be marked as > active > (flag 80). Is it? If not you can use the -a flag of fdisk to update the > active > partition. I think you should use something like 'fdisk -u -a -4 ad0'. L= ook > at the fdisk manual page to see what this does. I'm not sure if this is t= he > right invocation. I have never dealt with this problem. > > Setting the active partition _should_ be enough. If that doesn't work, > you're in > trouble. As far as I know there is no easy way to just change the partiti= on > type, without starting over. In theory you can set the type by fiddling s= ome > bits in the partition table, but that is probably harder than it sounds. > Maybe > sysinstall can do it, but I haven't tried. > > Next time you want to install FreeBSD on a disk, read =A716.3 "Adding Dis= ks" > of > the FreeBSD handbook first, and follow the steps laid out there! That wou= ld > create and active a single partition which would almost certainly have > avoided > this problem. > >> I also note that the other functioning FBSD 7.2 has partitions 2-4 as >> <UNUSED> and partition 1 has the cylinder parameters. >> >> I get the impression that I should use the disklabel editor to change >> all that but am not familiar with it and am not sure how to use it. > > No. The disklabel works at a lower level. > > Historically PC harddisks can be divided into 4 partitions (This is what > fdisk > does). So the disk ad0 can have partitions 1--4: ad0s1--ad0s4. In older > FreeBSD > literature these are called slices, hence the 's' in the partition name. > > FreeBSD can subdivide a partition in labeled sections. These sections are > labeled with a letter, so partition ad0s1 can be divided (in 7.x) into > labeled > pieces a--g: ad0s1a--ad0s1g. This is what the bsdlabel(8) program does. A= nd > it > is usually on these subdivisions that filesystems are created with newfs(= 8). > >> Is there a way to fix this thingy? > > Make sure that partition 4 is the active partition. That should fix it. > > Roland > -- > R.F.Smith http://www.xs4all.nl/~rsmith/ > [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] > pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) > HTH
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ade45ae90908241140s4ad214a2r79641a280e8e769>