Date: Fri, 26 Aug 2005 13:47:31 -0700 From: Brooks Davis <brooks@one-eyed-alien.net> To: Jan Pechanec <jp@devnull.cz> Cc: freebsd-stable@freebsd.org Subject: Re: how to find out the boot device Message-ID: <20050826204731.GA14701@odin.ac.hmc.edu> In-Reply-To: <20050826223000.O51719@axxem.hide.subzone.cz> References: <20050826223000.O51719@axxem.hide.subzone.cz>
next in thread | previous in thread | raw e-mail | index | archive | help
--TB36FDmn/VVEgNH/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 26, 2005 at 10:41:47PM +0200, Jan Pechanec wrote: >=20 > hello guys, >=20 > during the rc.d phase, I need to find out in a shell script from=20 > which disk the system has booted up. >=20 > - I cannot use kern.rootdev because my root fs is a memory disk > - I cannot use kern.disks because the first disk there doesn't=20 > necessarily mean the boot disk (eg. my home box says 'cd0 ad0' for that) > =09 > - I could use 'atacontrol list' or 'camcontrol devlist' because I=20 > always boot from the 1st disk, but if I have both types of disks then I h= ave=20 > 1st ATA disk and 1st SCSI disk and again unable to recognize which one is= =20 > the one I need. >=20 > any ideas, please? Use glabel and label the disk or file systems during deployment. Then you'll have /dev/label/<disk label> or /dev/ufs/<label> entries. Once that's done, it won't matter where the drive moves or what kind of bus you use. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --TB36FDmn/VVEgNH/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFDD3/iXY6L6fI4GtQRAntMAJ9j1QxxuLZtHRt+WXMOTIQA0+n7AQCdEkKL 7/s82y3dapKelo97VQRVe0A= =U6U1 -----END PGP SIGNATURE----- --TB36FDmn/VVEgNH/--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050826204731.GA14701>