Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Feb 1996 23:37:20 -0500 (EST)
From:      rnw+@andrew.cmu.edu (Robert N Watson)
To:        questions@freebsd.org
Subject:   Manually creating a bootable HD
Message-ID:  <0l_e60200YUd05r3A0@andrew.cmu.edu>

next in thread | raw e-mail | index | archive | help
I'm running 2.1.0R on a Gateway 2000 p120 w/32 megs ram, 2 EIDE
controllers and one Adaptec 2940 SCSI controller.  Currently hooked up I
have two WD 1 gig drives, a 540mb maxtor, and a 1.622 gig maxtor, and on
the SCSI partition, a direct access 340 meg SCSI drive.  I also have a
(currently unused) ATAPI cdrom.

The first 1 gig scsi drive is being sent back to Gateway 2000 because of
excessive bad sector problems, and I have moved almost all relevant
partitions to the other drives (df/mount map included as an appendix). 
Now I'm about ready to switch, only my root partition and boot stuff is
on wd0a, the drive I want to remove.  How do I go about making a hard
disk bootable from an existing config?  I think sysinstall might be
finagled into doing it,  but I'm hesitant because I'd rather it didn't
just install over my existing setup.

wd2 is the 1.622 drive, and the drive I'd like to boot up off of in a
day or two -- I've included the results of an fdisk, and a disklabel
read in the second appendix.  I anticipate one possible problem -- I did
not allow space for boot code in front of the first partition
(possibly?), and I read a note somewhere in an email about partitioning
new drives that that might be needed.  I assume that, once this is
sorted out (if needed) I just use disklabel and move over my kernel  and
root partition trees to the prepared new root partition (/new/root).

Any advice and suggestions as to how to implement this would be welcome!
 I would rather not overwrite my existing usr tree and so on by doing a
full sysinstall, as things are tailored a lot to my needs ( I run a web
server, CAP server, samba server, &tc..) so alternatives to that, or a
tested and known routine for doing a reinstall and making sure my config
and binaries are retained would be great.  Thanks in advance for your
much needed help!  I'd apprecaite it if responses were emailed to me and
posted to the questions newsgroup/emaillist.  Thanks.

Appendix 1: results of mount/df
fledge:~> mount
/dev/wd0a on / (local)
/dev/wd1a on /home (local)
procfs on /proc (local)
/dev/wd2s2e on /usr (local)
/dev/wd2s2f on /homea (local)
/dev/sd0a on /homec (local)
/dev/wd3a on /homeb (local)
fledge:~> df
Filesystem  1K-blocks     Used    Avail Capacity  Mounted on
/dev/wd0a       31775    19828     9405    68%    /
/dev/wd1a      517599   172012   304179    36%    /home
procfs              4        4        0   100%    /proc
/dev/wd2s2e    387246   281120    75146    79%    /usr
/dev/wd2s2f    916974   608158   235458    72%    /homea
/dev/sd0a      309711     1449   283485     1%    /homec
/dev/wd3a     1026143   103279   840772    11%    /homeb

---Appendix 2---

fledge:/homea/robert>  fdisk wd2
******* Working on device /dev/rwd2 *******
parameters extracted from in-core disklabel are:
cylinders=3158 heads=16 sectors/track=63 (1008 blks/cyl)

 Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=3158 heads=16 sectors/track=63 (1008 blks/cyl)

Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 0 is:
sysid 165,(FreeBSD/NetBSD/386BSD) 
    start 63, size 130977 (63 Meg), flag 80
        beg: cyl 0/ sector 1/ head 1;
        end: cyl 129/ sector 63/ head 15
The data for partition 1 is:
sysid 165,(FreeBSD/NetBSD/386BSD)
    start 131040, size 3052224 (1490 Meg), flag 80
        beg: cyl 130/ sector 1/ head 0;
        end: cyl 1023/ sector 63/ head 15
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
fledge:/homea/robert> disklabel -r wd2
(some cut)
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:   130977        0    4.2BSD        0     0     0   # (Cyl.    0 - 129*)
  c:   130977        0    unused        0     0         # (Cyl.    0 - 129*)
fledge:/homea/robert> disklabel -r wd2s2
(some cut)
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  b:   401408        0      swap                        # (Cyl.    0 - 398*)
  c:  3052224        0    unused        0     0         # (Cyl.    0 - 3027)
  e:   786432   401408    4.2BSD        0     0     0   # (Cyl.  398*- 1178*)
  f:  1864384  1187840    4.2BSD        0     0     0   # (Cyl. 1178*- 3027*)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0l_e60200YUd05r3A0>