Re: Detecting boot drive
Richard Neuboeck <[email protected]> Mon, 1 Feb 2016 09:20:27 +0100
| Newsgroups | gmane.linux.redhat.kickstart.general |
|---|---|
| Message-ID | <[email protected]> |
I would suggest creating a pre install script that finds the correct
boot device by querying all available devices until you find one
that meets your constraints. You can use either udevadm or try to
find some information directly in /sys.
i.e.
for i in /sys/block/[sv]d?
do
dev=$(basename $i)
# next if it's an usb device
if udevadm info --query=path --name=$dev | grep -q -e '/usb'
then
# Ignoring $dev since it's an usb device
continue
fi
# do something else
done
Cheers
Richard
On 02/01/2016 02:22 AM, Hajducko, Steven wrote:
> Can you speak more to that? I'm not understanding how that would
> work out. Doesn't the assignment of the label happen during the
> partition configuration - where as I need to know which disk is the
> first drive in the boot order before that ( so we can tell it that
> it has the / partition )
>
> This all needs to be done in a strictly automated fashion as well.
>
> From: <[email protected]
> <mailto:[email protected]>> on behalf of Andrew
> Simpson <[email protected] <mailto:[email protected]>>
> Reply-To: Discussion list about Kickstart <[email protected]
> <mailto:[email protected]>>
> Date: Sunday, January 31, 2016 at 5:10 PM
> To: Discussion list about Kickstart <[email protected]
> <mailto:[email protected]>>
> Subject: Re: Detecting boot drive
>
> have you thought about trying to find it by UUID or Label? I had a
> similar issue in a kickstart where I could not determine the boot
> drive while making a USB boot image. I ended up formatting the
> drives with a specific LABEL and using that in the kickstart instead
> of using sda/sdb/etc...
>
> Andrew Simpson
>
> On Fri, Jan 29, 2016 at 12:53 PM, Hajducko, Steven
> <[email protected] <mailto:[email protected]>> wrote:
>
> Is there a way to consistently detect the boot-drive, across
> multiple hardware platforms?
>
> We have several different hardware types - but it remains
> consistent that we always want the OS installed on the first
> drive in boot order. We played around with --on-bios-disk, but
> that doesn't always work ( it fails, for instance, on Dell
> R820's with the PERC RAID controller ). We've also tried
> specifying /dev/disk/by-id/edd-int13_dev80, which works on the
> Dell's, but fails on VMs. ( And then throw HP and it's cciss
> into the whole mix.. ). /dev/sda isn't always the boot disk -
> this happens to us with certain RAID configs like 1 logical
> drive and 8 JBOD's. The JBOD's get detected as /dev/sda-h and
> the RAID drive ( which is the boot drive ), ends up as /dev/sdi.
>
> Just curious if anyone else has come up with a solid way to
> always figure out what the boot drive is.
>
> _______________________________________________
> Kickstart-list mailing list
> [email protected] <mailto:[email protected]>
> https://www.redhat.com/mailman/listinfo/kickstart-list
>
>
>
>
> _______________________________________________
> Kickstart-list mailing list
> [email protected]
> https://www.redhat.com/mailman/listinfo/kickstart-list
>
--
/dev/null
_______________________________________________
Kickstart-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/kickstart-list
signature.asc
(application/pgp-signature, 819 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCgAGBQJWrxVLAAoJEA7XCanqEVqIi8kQANmoDa02hXnUFkclnTS1CQ5D HjKIx6qWltxGRQxZNGQnaLGTTKEImj/JUWZoKSOOnO/hCpmtxOftQl4rG4etWS3q MDDCs0SuQLPRlS6CtWJ2v8gYx7tDkXHqmqc3G4RXfg64w69VQtDLBtronjkwGj2K JW0pdKe6tj9z+Wbwyoelpzv3bCgHdtnZrO61qMlro2kcUQVrvAofshjEfoxpMzaC rrpdO8An0M6uIlU+11EIbp+E//+H9rZ2SepsKM6KjKNYCufYTrLlW2ghBdx4MlWr fC3BNeel91LWFAdLt0OLjjdT2RE4Jc4J1KN46CzdgvGJlQcFPBK5klPKVUjTAkJM WcdXovgoqVA8Q28p5BkP82bKrrbCs0UonI2Su2qNDm7jtQwwBjHlUHCXAPjWJGaH p8EcHgl5MnBQkHFOCtPmfG1AjbFJQRqEImyjUgiPztygY36rZ/EDLZ6FWVDf4MJi 0jVOPcWe23pIBS8rlAUja7CXt9Tsxk2dXzz36TbfddjcZG3ItUHoImV7wgOuwFgI wtiRzUfu7qXIRKbgJF1SMiboWpFaI8BJzh8F2wJL7GWv8ML5cTqb76OtM9uBrqEs E2fIM9otnmnq+spyn1ycshzTPT2XG4hYMsxEOa1AgbpvA4/mHWsn+/zEN/p3hOYx 2xPA0dZoYEZCmcm4CRGd =92w2 -----END PGP SIGNATURE-----