Hey guys,
I was setting up a test build host to look at what it would take to get
our product on FC4.
After a couple of tweaks to the build and installation script I was up
and running. And running straight into a weird problem.
For some reason my format_device function in the bash script was failing
on any of the mkswap/mke2fs commands. It was claiming that it couldn't
find /dev/<device>.
There's nothing wrong with the commands. The same script runs fine on
other build hosts here in the office. So I decided to dig a little
further. I wrote a test script and managed to replicate the problem.
The script basically is nuking the target devices partition table and
using parted to rebuild it for our install, then using mkswap/mke2fs to
format the new partitions.
The problem is with udev in that it seems to take an age to recognise
the changes performed by the parted commands. Even running from the
console, it seems to take between 10 to 12 seconds or so to pick up the
partition changes.
Brute force fix was to make a call to /sbin/start_udev which triggered a
a refresh. I'm sure there must be a better way to trigger this, so if
you've any suggestions, then please pass them on.
--
Glen Gray <glen at lincor.com> Digital Depot, Thomas Street
Senior Software Engineer Dublin 8, Ireland
Lincor Solutions Ltd. Ph: +353 (0) 1 4893682
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!