Date: Sun, 24 Mar 1996 14:56:12 +0100 (MET) From: Andreas Klemm <andreas@knobel.gun.de> To: jkh@freebsd.org Cc: hackers@freebsd.org Subject: [was/is: adding 2nd disk] little changes to sysinstall/Makefile Message-ID: <Pine.BSF.3.92.960324142217.2311A-100000@knobel.gun.de>
next in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- Hi Jordan ! In order to get my 2nd disk labeled properly I tried to fiddle around with sysinstall a bit. First thing that might be done better: sysinstall is located in /stand and won't be touched by 'make worlds'. So I had on my -current system the one from the FreeBSD Release 2.0.5. ;-) Since between releases many things might change in installation/maintenance area, /stand should be upgraded during make world's... So I had to checkout the newest -current and to build it. To get sysinstall compiled I had to make the following changes: Index: release/sysinstall/Makefile =================================================================== RCS file: /cvs/src/release/sysinstall/Makefile,v retrieving revision 1.27 diff -u -r1.27 Makefile - --- Makefile 1996/03/19 14:30:08 1.27 +++ Makefile 1996/03/24 13:20:59 @@ -11,10 +11,10 @@ makedevs.c media.c menus.c misc.c msg.c network.c nfs.c options.c \ package.c system.c tape.c tcpip.c termcap.c ufs.c variable.c wizard.c - -CFLAGS+= -Wall -I${.CURDIR}/../../gnu/lib/libdialog +CFLAGS+= -Wall -I${.CURDIR}/../../gnu/lib/libdialog -I../libdisk DPADD= ${LIBDIALOG} ${LIBNCURSES} ${LIBMYTINFO} ${LIBUTIL} ${LIBDISK} - -LDADD= -ldialog -lncurses -lmytinfo -lutil -ldisk +LDADD= -ldialog -lncurses -lmytinfo -lutil -L../libdisk -ldisk makedevs.c: Makefile rtermcap rm -f makedevs.tmp And to get it linked properly, I had to change the directory to ../libdisk manually to make libdisk. Final remark on adding a 2nd harddisk properly: Installing a 2nd harddisk with sysinstall isn't possible, because of the many extra sanity checks in the "Label" submenu. All you get is a "basic" disklabel in the "PARTITION" menu. But adding filesystems into the disklabel fails. You get error messages, that a / or /usr filesystem couldn't be found. And even if you do so, then an error messages tells you, that the disk couldn't be labeled. So everything that sysinstall gives to you, is a disk, that is "partially labeled" ;-) Another thing is, I had to manually change the disk geometry to 255/63 scheme. My first disk is so large (4GB) so that 64/32 head/sector mapping isn't sufficiant. If I don't change the geometry to 131/255/63, then the SCSI hostadapter BIOS complaints about it, that a drive with another geometry then the default boot disk was found. This prevents further booting, you have to press return, so ... it's deadly required, to change the geometry manually this time ... The nice part within sysinstall is, that it produces a basic disklabel, that allows you (in case you need it) to label the disk in a way, to be compatible with other OS's partitions, if you need it. So it reserves some extra space (53 sectors) at the beginning of the disk. BTW, best is, you write down the starting points and sizes in the PARTITION submenue. You need them later, if you write an entry for your disk in /etc/disktab. And, a disktab entry for my fujitsu now looks the following. The first entry was based on my first hacking without sysinstall, the 2nd with basic help of sysinstall... The other partitions I added here manually. # (ahc0:1:0): "FUJITSU M2694ES-512 8139" type 0 fixed SCSI 1 # sd1(ahc0:1:0): Direct-Access 1033MB (2117025 512 byte sectors) # sd1(ahc0:1:0): with 1819 cyls, 15 heads, and an average 77 sectors/track # 1819cyls * 15heads * 77sectors/track = 2100945 sectors # 1819cyls * 15heads * 78sectors/track = 2128230 sectors fujitsu|F2694ES|Fujitsu M2694ES-512 1.05GB:\ :dt=SCSI:\ :ty=winchester:\ :se#512:nt#15:ns#77:nc#1819:rm#5400:\ :pa#1893045:oa#207900:ba#8192:fa#1024:ta=4.2BSD:\ :pb#207900:ob#0:tb=swap: \ :pc#2117023:oc#0: fnew|newfujitsu|Fujitsu M2694ES-512 1.05GB:\ :dt=SCSI:\ :ty=winchester:\ :se#512:nt#255:ns#63:nc#131:rm#5400:\ :pa#1907844:oa#196608:ba#8192:fa#1024:ta=4.2BSD:\ :pb#196608:ob#0:tb=swap: \ :pc#2104452:oc#0:\ :pd#2104452:od#63: What makes me wonder is, that disklabel complains, if you choose the total sector size for the ":pc#" entry, which - - in theory - should reflect the total sector size of the disk. Choosing FreeBSD's slice size cures this, but it looks strange for me. BTW: One has to be carefull with the sector sizes for FreeBSD partitions, since the offset for the partition sizes starts with 0, where 0 is in fact "0 + 63", the offset of the FreeBSD slice. It's damn work to add a 2nd Harddisk :-) And for all of you who said "buh baeh", disklabel is outdated stuff, when I tried to help the user, who first asked ... HOW do YOU get a perfect disklabel for a 2nd disk, without using a proper disktab entry ???? Which hacked up -current are you using ?! :-(( Best would be, to make parts of sysinstall to a standalone program in /usr/sbin, where expert mode allows you to choose a partitioning in the "LABEL" submenu, as you like, without complaining about missing root and such ... But this seems to be a little extra work ... Since I already tried this and commented out three sanity checkings in the proper places ... The warning messages vanished, but ... the sysinstall core dumped during the "W"rite action :-( *sigh* ;-) What do you think about the following: don't remove the sanity checks in "LABEL" menue ("warning, you need a / filesystem, /usr filesystem), but make them only as WARNING's, so that one can ignore the WARNING's and skip them. Ok, this was a little long, but believe me, adding a 2nd disk was a bit long, too ;-)) Andreas /// - -- andreas@knobel.gun.de /\/\___ Wiechers & Partner Datentechnik GmbH Andreas Klemm ___/\/\/ $$ Support Unix - aklemm@wup.de $$ pgp p-key http://www-swiss.ai.mit.edu/~bal/pks-toplev.html >>> powered by <<< ftp://sunsite.unc.edu/pub/Linux/system/Printing/aps-491.tgz >>> FreeBSD <<< -----BEGIN PGP SIGNATURE----- Version: 2.6.2 iQCVAwUBMVVUfPMLpmkD/U+FAQHZywQAxazoKKVPHl8LUKiV+k33847qPvF34u8/ AAw+6fgrhxwKJ1KyvLqCH+WckMEDk3wH6wyfwGUi1HJryPv2n1fEM8zRlCoCRUjp 4PgvwWGlQS3kvsXflP2ITcRtV1pjY5P4Kj+EX6OuauJClIY5kiJvbqkub4OhM+YP QkYTP2IbA38= =kAg2 -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.92.960324142217.2311A-100000>