Why does sfdisk'ing in %pre break my kickstart?

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

 



Hi,

Not satisfied with the way that anaconda orders my partitions when I let it handle the partition tables, I tried using sfdisk in my %pre section, like so:

sfdisk -uC /dev/sda << EOF
1,26,83,*
27,131,82
158,,fd
EOF

sfdisk -uC /dev/sdb << EOF
1,26,83,*
27,131,82
158,,fd
EOF

And then did the appropriate things in my partitioning section, like:

part raid.1 --onpart=sda3
part raid.2 --onpart=sdb3
raid / --fstype=ext3 --level=1 --device=md0 raid.1 raid.2

Anaconda would then complain about "error opening 'md0': no such device or address". So I thought that perhaps md was getting started before my %pre section, and maybe I had to restart it or something, so I went with:

raidstop /dev/md0
echo *** before partition - /proc/mdstat shows:
cat /proc/mdstat
sleep 5

sfdisk -uC /dev/sda << EOF
1,26,83,*
27,131,82
158,,fd
EOF

sfdisk -uC /dev/sdb << EOF
1,26,83,*
27,131,82
158,,fd
EOF

cat >/tmp/raidtab << EOF
raiddev             /dev/md0
raid-level                  1
nr-raid-disks               2
chunk-size                  64
persistent-superblock       1
nr-spare-disks              0
    device          /dev/sda3
    raid-disk     0
    device          /dev/sdb3
    raid-disk     1
EOF
mkraid --configfile /tmp/raidtab -R /dev/md0
raidstart /dev/md0

echo *** in %pre - /proc/mdstat shows:
cat /proc/mdstat
sleep 5


Now, /proc/mdstat shows what I would expect in both places, i.e., no devices in the first one, and a raid 1 device on md0 in the second... but I still get the same error. It's weird because I can go to a shell and mkfs and mount /dev/md0 (and /tmp/md0) just fine.

So what gives?  Any ideas?

Thanks,
Mart



[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux