Two disk kickstart

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm having a little trouble with kickstart when the target box has more 
than one disk. In the %pre section of the kickstart file, I create a 
temporary file based on the number of disks present, then %include that 
file in the normal part of the kickstart file. The logic is this.

> d=
> declare -i i=0
> while read maj min blk nam; do
>   if [[ $nam =~ ^sd.$ ]]; then
>     d="$d,$nam"
>     i+=1
>   fi
> done </proc/partitions
> if [[ $i -eq 0 ]]; then
>   shutdown -H now
> fi
> d=${d#,}
> (
> echo bootloader --driveorder=$d --location=mbr --boot-drive=${d%%,*}
> echo clearpart --all --initlabel --drives=$d
> echo part /boot --fstype=ext4 --size=500 --ondisk=${d%%,*}
> echo part pv.01 --grow --size=500 --ondisk=${d%%,*}
> if [[ $i -eq 1 ]]; then
>   echo volgroup vg_me pv.01 --pesize=32768
> else
>   echo part pv.02 --grow --size=500 --ondisk=${d##*,}
>   echo volgroup vg_me pv.01 pv.02 --pesize=32768
> fi
> echo -n logvol /home --fstype=ext4 --name=lv_home --vgname=vg_me
> echo \ --grow --size=100
> echo -n logvol / --fstype=ext4 --name=lv_root --vgname=vg_me
> echo \ --grow --size=1024 --maxsize=51200
> echo -n logvol swap --name=lv_swap --vgname=vg_me --grow --size=1008
> echo \ --maxsize=2016
> ) >/tmp/diskpart

When I have two disks (I've haven't had more thus far), the logic works 
perfectly. Except... When the machine reboots, it tries to boot from the 
second disk, sdb, not from sda where the boot loader is. Of course, that 
doesn't work and the machine hangs.

My cure for this at this time is manual. I use the BIOS to disable the 
second disk, boot (which starts but fails), then use the BIOS to 
re-enable the second disk and everything works as it should. But why 
does the box think it should boot from the second disk?

The box is a Dell R510 server. I understand this might be peculiar to 
the R510. But if there is anything I can do in the kickstart file to 
avoid the problem, I'd sure like to do it.
-- 
Dave Close
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org




[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux