-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Andrea,
Sorry no good. The patch applies ok, but ....
Firstly the maximum size of a Minix file system is 64M so a fulel UYOK doesn't
fit. I got around this with --my-modules which does fit.
Then I ran into the filename size limit which is 30 characters.
>> tar -C /tmp/.systemimager.0 -cf - . | tar -C /tmp/.systemimager.1 -xf -
tar: ./etc/dhclient-script.systemimager-prefix: Cannot open: File name too long
The 'golden client' is a Vmware Server guest which needs the mpt drivers
(mptspi, mptscsih, mptbase, scsi_transport_spi).
I have a UYOK made from a Centos 4 golden client that I know works, so I should
be able to use that. So si_prepareclient --no-uyok
gets me an image.
The next issue that I have encountered is with the partitioning information.
# parted -s -- /dev/sda unit MB print
Disk /dev/sda: 4295MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 0.03MB 74.0MB 74.0MB primary ext3 boot, , , , , , , , ,
type=83, ,
2 74.0MB 3775MB 3701MB primary , , , , , lvm, , , ,
type=8e, ,
3 3775MB 4294MB 518MB primary , , , , , lvm, , , ,
type=8e, ,
But, autoinstallscript.conf has:
<disk dev="/dev/sda" label_type="msdos" unit_of_measurement="MB">
<!--
This disk's output was brought to you by the partition tool "parted",
and by the numbers 4 and 5 and the letter Q.
-->
<part num="1" size="73.97" p_type="primary" p_name="-" flags="-" />
<part num="2" size="3701" p_type="primary" p_name="-" flags="-" />
<part num="3" size="519" p_type="primary" p_name="-" flags="-" />
</disk>
None of the flags have been picked up so I have no LVM partitions.
In Common.pm, the code
#
# Extract any flags, and remove them from the leftovers. -BEF-
#
if ( $leftovers =~ s/\s*(($flag_regex)(, *$flag_regex)*)\s*$//go ) {
$flags = $1;
} else {
$flags = '';
}
never has any matches, so $flags is always ''. Unfortunately my regular
expression skills weren't up to the task of figuring out why.
Thanks
Mike
Andrea Righi wrote:
> Mike Brady wrote:
>> Kernel config attached. This is from an openSUSE 10.2
>> 2.6.18.8-0.1-default x86_64 kernel.
>>
>> Looks like the only built in file system is minix?
>>
>> Thanks
>>
>> Mike
>>
>
> Mike,
>
> could you try if the following patch works? it adds the minix
> fs to the filesystems that can be used to create a valid initrd.img...
>
> Regards,
> -Andrea
>
> Index: lib/SystemImager/UseYourOwnKernel.pm
> ===================================================================
> --- lib/SystemImager/UseYourOwnKernel.pm (revision 3963)
> +++ lib/SystemImager/UseYourOwnKernel.pm (working copy)
> @@ -451,7 +451,7 @@
> open(FILESYSTEMS,"<$file") or die("Couldn't open $file for
> reading.");
> while (<FILESYSTEMS>) {
> chomp;
> - push (@filesystems, $_) if
> (m/(cramfs|ext2|ext3|reiserfs|xfs|jfs)/);
> + push (@filesystems, $_) if
> (m/(cramfs|ext2|ext3|reiserfs|xfs|jfs|minix)/);
> }
> close(FILESYSTEMS);
>
> @@ -511,6 +511,15 @@
> print "XXX just need to verify where the xfs module
> lives.\n";
> }
>
> + # minix
> + elsif ((grep { /minix/ } @filesystems)
> + and (! -e "$modules_dir/kernel/fs/ext2/minix.o")
> + and (! -e "$modules_dir/kernel/fs/ext2/minix.ko")
> + and (! -e "$modules_dir/kernel/fs/ext2/minix.ko.gz")
> + ) {
> + $fs = "minix";
> + }
> +
> unless(defined $fs) {
>
> die("Can't determine the appropriate filesystem to use for
> an initrd.");
> @@ -668,6 +677,8 @@
> _create_initrd_jfs($staging_dir, $boot_dir);
> } elsif ($fs eq 'xfs') {
> _create_initrd_xfs($staging_dir, $boot_dir);
> + } elsif ($fs eq 'minix') {
> + _create_initrd_minix($staging_dir, $boot_dir);
> } else {
> die("FATAL: Unable to create initrd using $fs\n");
> }
> @@ -915,6 +926,63 @@
> return 1;
> }
>
> +sub _create_initrd_minix($$) {
> +
> + my $staging_dir = shift;
> + my $boot_dir = shift;
> +
> + my $new_initrd = $boot_dir . "/initrd";
> +
> + my $new_initrd_mount_dir = _mk_tmp_dir();
> +
> + # cleanup routine.
> + $SIG{__DIE__} = sub {
> + my $msg = shift;
> + run_cmd("umount $new_initrd_mount_dir", $verbose, 0) if
> ($is_mounted);
> + unlink($new_initrd) if (-f $new_initrd);
> + run_cmd("rm -fr $staging_dir $new_initrd_mount_dir", $verbose,
> 1);
> + die $msg;
> + };
> +
> + print ">>> New initrd mount point: $new_initrd_mount_dir\n"
> if($verbose);
> + eval { mkpath($new_initrd_mount_dir, 0, 0755) };
> + if ($@) {
> + die "Couldn't mkpath $new_initrd_mount_dir $@";
> + }
> +
> + my $cmd;
> +
> + # loopback file
> + chomp(my $size = `du -ks $staging_dir`);
> + $size =~ s/\s+.*$//;
> + my $breathing_room = 2000;
> + $size = $size + $breathing_room;
> + run_cmd("dd if=/dev/zero of=$new_initrd bs=1024 count=$size",
> $verbose, 1);
> +
> + # fs creation
> + chomp(my $inodes = `find $staging_dir -printf "%i\n" | sort -u | wc
> -l`);
> + $inodes = $inodes + 10;
> + run_cmd("mkfs.minix $new_initrd", $verbose, 1);
> +
> + # mount
> + run_cmd("mount $new_initrd $new_initrd_mount_dir -o loop -t minix",
> $verbose);
> + $is_mounted = 1;
> +
> + # copy from staging dir to new initrd
> + run_cmd("tar -C $staging_dir -cf - . | tar -C $new_initrd_mount_dir
> -xf -", $verbose, 0);
> +
> + # umount and gzip up
> + run_cmd("umount $new_initrd_mount_dir", $verbose);
> + $is_mounted = 0;
> + run_cmd("gzip -f -9 -S .img $new_initrd", $verbose);
> + run_cmd("ls -l $new_initrd.img", $verbose, 1) if($verbose);
> +
> + # cleanup the temporary mount dir
> + run_cmd("rm -fr $new_initrd_mount_dir", $verbose, 1);
> +
> + return 1;
> +}
> +
> #
> # Usage:
> # run_cmd("my shell command", 1, 1);
- --
Mike Brady
GPG Key ID: 0x9C777DA4
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFF85xf6xLAi5x3faQRAr1qAJ4o1Y22TwjxYLwygk7GpojtEHoWBgCeOUIy
C53Q42QkPFWFg4BJS7u2E1o=
=lwwl
-----END PGP SIGNATURE-----
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
sisuite-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sisuite-users