Re: how do I detect the HDD's on the system?

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

 



Pablo Iranzo Gómez wrote:
	Hi!

	%include /tmp/part-include

	%pre
set $(list-harddrives)
let numd=$#/2 # Número de discos
d1=$1 # 1st HDD drive
S1=$2 # 1st HDD size

DISCO=$d1

echo "clearpart --drives=$DISCO --all --initlabel" >> /tmp/part-include
echo "part /boot --fstype ext3 --size=100 --ondisk=$DISCO" >> /tmp/part-include
echo "part pv.100000 --size=1 --grow --ondisk=$DISCO" >>  /tmp/part-include
echo "volgroup VolGroup --pesize=32768 pv.100000" >> /tmp/part-include
echo "logvol swap --fstype swap --name=Swap --vgname=VolGroup --size=2047" >> /tmp/part-include
echo "logvol  / --fstype ext3 --name=root --vgname=VolGroup --size=1024" >> /tmp/part-include
echo "logvol /home --fstype ext3 --size=1024 --name=home --vgname=VolGroup" >> /tmp/part-include
echo "logvol /tmp --fstype ext3 --size=1024 --name=tmp --vgname=VolGroup" >> /tmp/part-include
echo "logvol /usr --fstype ext3 --size=3000 --name=usr --vgname=VolGroup" >> /tmp/part-include
echo "logvol /opt --fstype ext3 --size=12000 --name=opt --vgname=VolGroup" >> /tmp/part-include
echo "part /opt/iso --fstype vfat --size=4410 --ondisk=$DISCO" >> /tmp/part-include


	But with your intended partitioning layout and required "conditionals"
to automatically setup raid as expressed in previous posts on this
thread

	Regards
	Pablo



Thanx Pablo

I've only had time to play around with this today, but with very little success. Here's my kickstart config for the partitioning:

# Determine how many number/type/size of drives we have
set $(list-harddrives)
let numd=$#/2 # This will provide the total # of drives
d1=$1 # This is the device of disk 1
d2=$3 # This is the device of disk 2, etc.
d3=$5
d4=$7
d5=%9
S1=$2 # This is the size of disk 1
S2=$4 # This is the size of disk 2, etc.
S3=$6
S4=$8
S5=$10

%include /tmp/partinfo

# This would be a partition scheme for three or more drives
if [ $numd -ge 3 ] ; then
cat << EOF >> /tmp/partinfo
part raid.11    --size 200      --asprimary     --ondrive=$d1
part raid.12    --size 2048     --asprimary     --ondrive=$d1
part raid.13    --size 1 --grow                 --ondrive=$d1

part raid.21    --size 200      --asprimary     --ondrive=$d2
part raid.22    --size 2048     --asprimary     --ondrive=$d2
part raid.23    --size 1 --grow                 --ondrive=$d2

part raid.31    --size 200      --asprimary     --ondrive=$d3
part raid.32    --size 2048     --asprimary     --ondrive=$d3
part raid.33    --size 1 --grow                 --ondrive=$d3

raid /boot --fstype ext3 --device md0 --level=RAID1 raid.11 raid.21 raid.31 --spare=1 raid swap --fstype swap --device md1 --level=RAID1 raid.12 raid.22 raid.32 --spare=1 raid pv.01 --fstype ext3 --device md2 --level=RAID1 raid.13 raid.23 raid.33 --spare=1
EOF
elif [ $numd - ge 2 ]; then
cat << EOF >> /tmp/partinfo
part /boot     --fstype ext3 --size=150  --ondisk=$d1
part swap                    --size=4092 --ondisk=$d1,$d2
part pv.01     --fstype ext3 --size=100  --grow --ondisk=$d1
part pv.02     --fstype ext3 --size=100  --grow --ondisk=$d2
EOF
else
cat << EOF >> /tmp/partinfo
part /boot     --fstype ext3 --size=150  --ondisk=$d1
part swap                    --size=4092 --ondisk=$d1
part pv.01     --fstype ext3 --size=100  --grow --ondisk=$d1
EOF
fi


# LVM configuration so that we can resize /, /var and /usr/ later
logvol /                --vgname=sysvg  --size=3072     --name=root
logvol /usr             --vgname=sysvg  --size=8192     --name=usr
logvol /tmp             --vgname=sysvg  --size=1024     --name=tmp
logvol /var             --vgname=sysvg  --size=8192     --name=var
logvol /home            --vgname=sysvg  --size=20480    --name=home
if [ pv.02 ]; then
logvol /bck             --vgname=pv.02  --size=1 --grow --name=bck
fi


Yet, when I run fdisk -l, there's no partitioning information, almost asif the installation script doesn't run the included /tmp/partinfo file Attached the the /tmp/partinfo & /tmp/anaconda.log files - maybe you could see something I missed?

--

Kind Regards
Rudi Ahlers
CEO, SoftDux

Web:   http://www.SoftDux.com
Check out my technical blog, http://blog.softdux.com for Linux or other technical stuff, or visit http://www.WebHostingTalk.co.za for Web Hosting stugg

12:19:40 INFO    : 2051624 kB are available
12:19:40 INFO    : modules to insert cramfs fat vfat sunrpc lockd fscache nfs_acl nfs loop isofs floppy edd pcspkr squashfs
12:19:40 DEBUG   : getModuleLocation: 2.6.18-53.el5/x86_64
12:19:40 INFO    : loaded cramfs from /modules/modules.cgz
12:19:40 INFO    : loaded fat from /modules/modules.cgz
12:19:40 INFO    : loaded vfat from /modules/modules.cgz
12:19:40 INFO    : loaded sunrpc from /modules/modules.cgz
12:19:40 INFO    : loaded lockd from /modules/modules.cgz
12:19:40 INFO    : loaded fscache from /modules/modules.cgz
12:19:40 INFO    : loaded nfs_acl from /modules/modules.cgz
12:19:40 INFO    : loaded nfs from /modules/modules.cgz
12:19:40 INFO    : loaded loop from /modules/modules.cgz
12:19:40 INFO    : loaded floppy from /modules/modules.cgz
12:19:40 INFO    : loaded edd from /modules/modules.cgz
12:19:40 INFO    : loaded pcspkr from /modules/modules.cgz
12:19:40 INFO    : loaded squashfs from /modules/modules.cgz
12:19:40 DEBUG   : module(s) isofs not found
12:19:40 INFO    : inserted /tmp/cramfs.ko
12:19:40 INFO    : inserted /tmp/fat.ko
12:19:40 INFO    : inserted /tmp/vfat.ko
12:19:40 INFO    : inserted /tmp/sunrpc.ko
12:19:40 INFO    : inserted /tmp/lockd.ko
12:19:40 INFO    : inserted /tmp/fscache.ko
12:19:40 INFO    : inserted /tmp/nfs_acl.ko
12:19:40 INFO    : inserted /tmp/nfs.ko
12:19:40 INFO    : inserted /tmp/loop.ko
12:19:43 WARNING : failed to insert module (19)
12:19:43 ERROR   : failed to insert /tmp/floppy.ko
12:19:43 INFO    : inserted /tmp/edd.ko
12:19:43 INFO    : inserted /tmp/pcspkr.ko
12:19:43 INFO    : inserted /tmp/squashfs.ko
12:19:43 INFO    : load module set done
12:19:43 INFO    : modules to insert ipv6
12:19:43 DEBUG   : getModuleLocation: 2.6.18-53.el5/x86_64
12:19:43 INFO    : loaded ipv6 from /modules/modules.cgz
12:19:43 INFO    : inserted /tmp/ipv6.ko
12:19:43 INFO    : load module set done
12:19:43 INFO    : modules to insert cdrom ide-cd
12:19:43 DEBUG   : getModuleLocation: 2.6.18-53.el5/x86_64
12:19:43 INFO    : loaded cdrom from /modules/modules.cgz
12:19:43 INFO    : loaded ide-cd from /modules/modules.cgz
12:19:43 INFO    : inserted /tmp/cdrom.ko
12:19:43 INFO    : inserted /tmp/ide-cd.ko
12:19:43 INFO    : load module set done
12:19:43 INFO    : modules to insert scsi_mod sd_mod sr_mod
12:19:43 DEBUG   : getModuleLocation: 2.6.18-53.el5/x86_64
12:19:44 INFO    : loaded scsi_mod from /modules/modules.cgz
12:19:44 INFO    : loaded sd_mod from /modules/modules.cgz
12:19:44 INFO    : loaded sr_mod from /modules/modules.cgz
12:19:44 INFO    : inserted /tmp/scsi_mod.ko
12:19:44 INFO    : inserted /tmp/sd_mod.ko
12:19:44 INFO    : inserted /tmp/sr_mod.ko
12:19:44 INFO    : load module set done
12:19:44 INFO    : modules to insert scsi_transport_iscsi libiscsi iscsi_tcp
12:19:44 DEBUG   : getModuleLocation: 2.6.18-53.el5/x86_64
12:19:44 INFO    : loaded scsi_transport_iscsi from /modules/modules.cgz
12:19:44 INFO    : loaded libiscsi from /modules/modules.cgz
12:19:44 INFO    : loaded iscsi_tcp from /modules/modules.cgz
12:19:44 INFO    : inserted /tmp/scsi_transport_iscsi.ko
12:19:44 INFO    : inserted /tmp/libiscsi.ko
12:19:44 INFO    : inserted /tmp/iscsi_tcp.ko
12:19:44 INFO    : load module set done
12:19:44 INFO    : looking for usb controllers
12:19:44 INFO    : found USB controller ehci-hcd
12:19:44 INFO    : modules to insert ehci-hcd
12:19:44 DEBUG   : getModuleLocation: 2.6.18-53.el5/x86_64
12:19:44 INFO    : loaded ehci-hcd from /modules/modules.cgz
12:19:44 INFO    : inserted /tmp/ehci-hcd.ko
12:19:44 INFO    : load module set done
12:19:44 INFO    : found USB controller uhci-hcd
12:19:44 INFO    : modules to insert uhci-hcd
12:19:44 DEBUG   : getModuleLocation: 2.6.18-53.el5/x86_64
12:19:44 INFO    : loaded uhci-hcd from /modules/modules.cgz
12:19:45 INFO    : inserted /tmp/uhci-hcd.ko
12:19:45 INFO    : load module set done
12:19:45 INFO    : found USB controller uhci-hcd
12:19:45 INFO    : modules to insert
12:19:45 DEBUG   : getModuleLocation: 2.6.18-53.el5/x86_64
12:19:45 INFO    : load module set done
12:19:45 INFO    : found USB controller uhci-hcd
12:19:45 INFO    : modules to insert
12:19:45 DEBUG   : getModuleLocation: 2.6.18-53.el5/x86_64
12:19:45 INFO    : load module set done
12:19:45 INFO    : found USB controller uhci-hcd
12:19:45 INFO    : modules to insert
12:19:45 DEBUG   : getModuleLocation: 2.6.18-53.el5/x86_64
12:19:45 INFO    : load module set done
12:19:45 DEBUG   : waiting for usb to become stable...
12:19:49 DEBUG   : 4 seconds.
12:19:49 INFO    : modules to insert hid keybdev
12:19:49 DEBUG   : getModuleLocation: 2.6.18-53.el5/x86_64
12:19:49 DEBUG   : module(s) hid keybdev not found
12:19:49 INFO    : load module set done
12:19:50 INFO    : no firewire controller found
12:19:50 DEBUG   : no pcic controller found
12:19:50 DEBUG   : probing buses
12:19:50 DEBUG   : finished bus probing
12:19:50 DEBUG   : ignoring driverless device Intel Corporation Unknown device 27da
12:19:50 DEBUG   : ignoring driverless device Intel Corporation Unknown device 27b8
12:19:50 DEBUG   : ignoring driverless device Intel Corporation Unknown device 244e
12:19:50 DEBUG   : ignoring driverless device Intel Corporation Unknown device 2770
12:19:50 DEBUG   : ignoring driverless device Realtek Semiconductor Co., Ltd. Unknown device 8167
12:19:50 DEBUG   : ignoring driverless device Intel Corporation Unknown device 27d8
12:19:50 DEBUG   : ignoring driverless device Intel Corporation 82945G/GZ Integrated Graphics Controller
12:19:50 INFO    : modules to insert r8169 libata ata_piix
12:19:50 DEBUG   : getModuleLocation: 2.6.18-53.el5/x86_64
12:19:50 INFO    : loaded r8169 from /modules/modules.cgz
12:19:50 INFO    : loaded libata from /modules/modules.cgz
12:19:50 INFO    : loaded ata_piix from /modules/modules.cgz
12:19:50 INFO    : inserted /tmp/r8169.ko
12:19:50 INFO    : inserted /tmp/libata.ko
12:19:51 INFO    : inserted /tmp/ata_piix.ko
12:19:51 INFO    : load module set done
12:19:51 INFO    : getting kickstart file
12:19:51 INFO    : getting kickstart file from first CDROM
12:19:51 INFO    : getFileFromBlockDevice(hda, /ks.cfg)
12:19:52 INFO    : Searching for file on path /tmp/mnt//ks.cfg
12:19:52 INFO    : file copied to /tmp/ks.cfg
12:19:52 INFO    : setting up kickstart
12:19:52 INFO    : kickstartFromCD
12:19:55 DEBUG   : going to set language to en_US.UTF-8
12:19:55 INFO    : setting language to en_US.UTF-8
12:19:55 INFO    : starting to STEP_URL
12:19:55 INFO    : trying to mount CD device hda
12:19:55 INFO    : mntloop loop0 on /mnt/runtime as /mnt/source/images/stage2.img fd is 10
12:19:59 INFO    : got url cdrom://hda:/mnt/source
12:19:59 INFO    : Loading SELinux policy
12:20:13 INFO    : getting ready to spawn shell now
12:20:13 INFO    : modules to insert
12:20:13 DEBUG   : getModuleLocation: 2.6.18-53.el5/x86_64
12:20:13 INFO    : load module set done
12:20:13 INFO    : modules to insert
12:20:13 DEBUG   : getModuleLocation: 2.6.18-53.el5/x86_64
12:20:13 INFO    : load module set done
12:20:13 INFO    : modules to insert
12:20:13 DEBUG   : getModuleLocation: 2.6.18-53.el5/x86_64
12:20:13 INFO    : load module set done
12:20:13 DEBUG   : probing buses
12:20:14 DEBUG   : finished bus probing
12:20:14 DEBUG   : ignoring driverless device Intel Corporation 82801G (ICH7 Family) SMBus Controller
12:20:14 DEBUG   : ignoring driverless device Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge
12:20:14 DEBUG   : ignoring driverless device Intel Corporation 82801 PCI Bridge
12:20:14 DEBUG   : ignoring driverless device Intel Corporation 82945G/GZ/P/PL Memory Controller Hub
12:20:14 DEBUG   : ignoring driverless device Realtek Semiconductor Co., Ltd. RTL-8110SC/8169SC Gigabit Ethernet
12:20:14 DEBUG   : ignoring driverless device Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller
12:20:14 DEBUG   : ignoring driverless device Intel Corporation 82945G/GZ Integrated Graphics Controller
12:20:14 INFO    : modules to insert
12:20:14 DEBUG   : getModuleLocation: 2.6.18-53.el5/x86_64
12:20:14 INFO    : load module set done
12:20:14 INFO    : modules to insert md raid0 raid1 raid5 raid6 xor raid456 msdos jbd ext3 gfs2 lock_nolock reiserfs jfs xfs dm-mod dm-zero dm-mirror dm-snapshot dm-multipath dm-round-robin dm-emc
12:20:14 DEBUG   : getModuleLocation: 2.6.18-53.el5/x86_64
12:20:14 INFO    : loaded raid0 from /modules/modules.cgz
12:20:14 INFO    : loaded raid1 from /modules/modules.cgz
12:20:14 INFO    : loaded xor from /modules/modules.cgz
12:20:14 INFO    : loaded raid456 from /modules/modules.cgz
12:20:14 INFO    : loaded msdos from /modules/modules.cgz
12:20:14 INFO    : loaded jbd from /modules/modules.cgz
12:20:14 INFO    : loaded ext3 from /modules/modules.cgz
12:20:14 INFO    : loaded gfs2 from /modules/modules.cgz
12:20:14 INFO    : loaded lock_nolock from /modules/modules.cgz
12:20:14 INFO    : loaded dm-mod from /modules/modules.cgz
12:20:14 INFO    : loaded dm-zero from /modules/modules.cgz
12:20:14 INFO    : loaded dm-mirror from /modules/modules.cgz
12:20:14 INFO    : loaded dm-snapshot from /modules/modules.cgz
12:20:14 INFO    : loaded dm-multipath from /modules/modules.cgz
12:20:14 INFO    : loaded dm-round-robin from /modules/modules.cgz
12:20:14 INFO    : loaded dm-emc from /modules/modules.cgz
12:20:14 DEBUG   : module(s) md raid5 raid6 reiserfs jfs xfs not found
12:20:14 INFO    : inserted /tmp/raid0.ko
12:20:14 INFO    : inserted /tmp/raid1.ko
12:20:14 INFO    : inserted /tmp/xor.ko
12:20:14 INFO    : inserted /tmp/raid456.ko
12:20:14 INFO    : inserted /tmp/msdos.ko
12:20:14 INFO    : inserted /tmp/jbd.ko
12:20:15 INFO    : inserted /tmp/ext3.ko
12:20:15 INFO    : inserted /tmp/gfs2.ko
12:20:15 INFO    : inserted /tmp/lock_nolock.ko
12:20:15 INFO    : inserted /tmp/dm-mod.ko
12:20:15 INFO    : inserted /tmp/dm-zero.ko
12:20:15 INFO    : inserted /tmp/dm-mirror.ko
12:20:15 INFO    : inserted /tmp/dm-snapshot.ko
12:20:15 INFO    : inserted /tmp/dm-multipath.ko
12:20:15 INFO    : inserted /tmp/dm-round-robin.ko
12:20:15 INFO    : inserted /tmp/dm-emc.ko
12:20:15 INFO    : load module set done
12:20:15 INFO    : looking for USB mouse...
12:20:15 INFO    : Running anaconda script /usr/bin/anaconda
12:20:25 INFO    : using only installclass CentOS Linux
12:20:26 INFO    : using only installclass CentOS Linux
12:20:26 INFO    : Display mode = g
12:20:26 INFO    : Method = cdrom://hda:/mnt/source
12:20:34 WARNING : no floppy devices found but we'll try fd0 anyway
12:20:45 INFO    : Started mini-wm
12:20:45 INFO    : Starting graphical installation...
12:20:48 DEBUG   : starting mpaths
12:20:48 DEBUG   : self.driveList(): ['sdb', 'hdb', 'sda']
12:20:48 DEBUG   : DiskSet.skippedDisks: []
12:20:48 DEBUG   : DiskSet.skippedDisks: []
12:20:48 DEBUG   : done starting mpaths.  Drivelist: ['sdb', 'hdb', 'sda']
12:20:48 DEBUG   : starting dmraids
12:20:48 DEBUG   : self.driveList(): ['sdb', 'hdb', 'sda']
12:20:48 DEBUG   : DiskSet.skippedDisks: []
12:20:48 DEBUG   : DiskSet.skippedDisks: []
12:20:48 DEBUG   : starting all dmraids on drives ['sdb', 'hdb', 'sda']
12:20:48 DEBUG   : scanning for dmraid on drives ['sdb', 'hdb', 'sda']
12:20:49 DEBUG   : done starting dmraids.  Drivelist: ['sdb', 'hdb', 'sda']
12:20:49 INFO    : Running kickstart %%pre script(s)
12:21:00 ERROR   : Error code 127 encountered running a kickstart %pre/%post script
12:21:00 INFO    : All kickstart %%pre script(s) have been run
part raid.11    --size 200      --asprimary     --ondrive=hdb
part raid.12    --size 2048     --asprimary     --ondrive=hdb
part raid.13    --size 1 --grow                 --ondrive=hdb

part raid.21    --size 200      --asprimary     --ondrive=sda
part raid.22    --size 2048     --asprimary     --ondrive=sda
part raid.23    --size 1 --grow                 --ondrive=sda

part raid.31    --size 200      --asprimary     --ondrive=sdb
part raid.32    --size 2048     --asprimary     --ondrive=sdb
part raid.33    --size 1 --grow                 --ondrive=sdb

raid /boot      --fstype ext3 --device md0 --level=RAID1 raid.11 raid.21 raid.31 --spare=1
raid swap       --fstype swap --device md1 --level=RAID1 raid.12 raid.22 raid.32 --spare=1
raid pv.01      --fstype ext3 --device md2 --level=RAID1 raid.13 raid.23 raid.33 --spare=1

logvol /                --vgname=sysvg  --size=3072     --name=root
logvol /usr             --vgname=sysvg  --size=8192     --name=usr
logvol /tmp             --vgname=sysvg  --size=1024     --name=tmp
logvol /var             --vgname=sysvg  --size=8192     --name=var
logvol /home            --vgname=sysvg  --size=20480    --name=home
logvol /bck             --vgname=pv.02  --size=1 --grow --name=bck

_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list

[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux