Is it possible to preserve data on partitions while reinstalling Red Hat Enterprise Linux 6 using kickstart?
Issue
- The originally partitioned disks were created with the following configurations.
bootloader --location=mbr --driveorder=sda,sdb
clearpart --drives=sda --all --initlabel
part /boot --fstype=ext2 --size=150 --asprimary --ondrive=sda
part swap --size=4000 --asprimary --ondrive=sda
part / --fstype=ext4 --size=150000 --asprimary --ondrive=sda
part /data --size=1 --grow --fstype ext4 --ondrive=sda
part /fastdata --size=1 --grow --fstype xfs --ondrive=sdb
- This works great. However, when reinstallation is required on the host, it's required to preserve the data on
/dev/sda3(/data) and/dev/sdb(/fastdata) using the following partition scheme
bootloader --location=mbr
clearpart --none
part /boot --fstype=ext2 --asprimary --onpart=sda1
part swap --asprimary --onpart=sda2
part / --fstype=ext4 --asprimary --onpart=sda3
part /data --grow --fstype ext4 --onpart=sda4 --noformat
part /fastdata --grow --fstype xfs --onpart=sdb1 --noformat
- When using the above partitioning scheme,
GRUBwill try and boot fromhd1instead ofhd0. Tried specifying the--driveorder=sdabut the partition table is wiped out andonpartcommands shows errors because they don't find the correct partition.
Environment
- Red Hat Enterprise Linux 6
- Kickstart
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
