-
Every time I install the OS, I find that the hard disk name is always changing, and I can not accurately identify the hard disk through sda, sdb and sdc. This bothers me because I install linux through kickstart, but my server has multiple hard disks, and I just want to install the system on the same hard disk every time. I know that sdX is not a persistent name for Linux, but I still want to know if there is a way to solve my problem? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi! There are several alternatives you can use. They are described in the kickstart documentation: |
Beta Was this translation helpful? Give feedback.
-
Hello, You can use "lsblk" command in %pre section. So that you can decide which disk you'll use according to lsblk's output. For example "lsblk -Sbdo SIZE,NAME,MODEL" command may give some unique values for you to choose. In my environment i always make the installation on RAID disks, so i need to select the RAID disk, not other physical disks. I use below values to identify the suitable disk and it's size.
All runs in %pre section. |
Beta Was this translation helpful? Give feedback.
Hi! There are several alternatives you can use. They are described in the kickstart documentation:
https://pykickstart.readthedocs.io/en/latest/kickstart-docs.html#special-notes-for-referring-to-disks