On 23 dec. 2011, at 11:15, Jérémie Tétillon wrote: Bas,
Thanks for your help! I managed to get things done by adding this line in my masterscript : Your welcome., I am glad you solved your problem. I will add our grub2 post install script to our functions, So more people can use it. rm -rf /dev/mapper/mvg-racine && cp -R /dev/dm-0 /dev/mapper/mvg-racine That is the solution. I saw that there is a fix in newer version of grub2 to allow symlinks under /dev/mapper. Le 21/12/2011 10:19, Jérémie Tétillon a écrit : The server and the image are ubuntu 10.04 lucid lynx I'm running grub 1.98-1ubuntu7 Le 20/12/2011 18:06, Jérémie Tétillon a écrit : Thanks for your help Bas ! I'm using sali version 1.4.10 (i've just tried with 1.4.11 also) Still no luck : setting up grub: running grub.. Using GRUB2 install method! :: /dev/sda grub-install --no-floppy /dev/sda Installation finished. No error reported. grub-mkconfig -o /boot/grub/grub.cfg This command can take while... /usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?). GRUB2 install done (of course yes, /dev is mounted) test-01:~ root# cat /proc/mounts rootfs / rootfs rw 0 0 proc /proc proc rw,relatime 0 0 sysfs /sys sysfs rw,relatime 0 0 tmpfs /dev tmpfs rw,relatime,mode=755 0 0 devpts /dev/pts devpts rw,relatime,mode=600 0 0 /dev/mapper/mvg-racine /a ext4 rw,relatime,barrier=1,data=ordered 0 0 /dev/mapper/mvg-home /a/home ext4 rw,relatime,barrier=1,data=ordered 0 0 /dev/sda1 /a/boot ext2 rw,relatime,errors=continue 0 0 proc /a/proc proc rw,relatime 0 0 sysfs /a/sys sysfs rw,relatime 0 0 tmpfs /a/dev tmpfs rw,relatime,mode=755 0 0 here is my masterscript : #!/bin/sh . /tmp/variables.txt . /etc/init.d/functions if [ "$GRUB2" == "yes" ]; then DISKLABEL=gpt else DISKLABEL=msdos fi get_arch NO_LISTING=yes if [ -z $NO_LISTING ]; then VERBOSE_OPT="v" else VERBOSE_OPT="" fi # Remove .master from script name # SARA_IMAGE=`echo $0 | cut -d. -f1` echo $0 echo $IMAGENAME [ -z $IMAGENAME ] && IMAGENAME=`basename $SARA_IMAGE` [ -z $OVERRIDES ] && OVERRIDES=`basename $SARA_IMAGE` echo $IMAGENAME ### BEGIN Check to be sure this not run from a working machine ### # Test for mounted SCSI or IDE disks mount | grep [hs]d[a-z][1-9] > /dev/null 2>&1 [ $? -eq 0 ] && logmsg Sorry. Must not run on a working machine... && shellout # disk enumeration disk_enumerate "sd" ## Begin disk creation and mounting # Create disk label. This ensures that all remnants of the old label, whatever # type it was, are removed and that we're starting with a clean label. logmsg "set_disklabel $DISK0 $DISKLABEL" set_disklabel $DISK0 $DISKLABEL # partitionstring == size:type:mount:label if [ "$DISKLABEL" == "msdos" ]; then logmsg "partition $DISK0 1024:ext2.128:/boot:boot 1:none 0:none::lvm" partition $DISK0 1024:ext2.128:/boot:boot 1:none 0:none::lvm else logmsg "partition $DISK0 1024:ext2:/boot:boot 1:grub_bios::grub 0:none::lvm" partition $DISK0 1024:ext2.128:/boot:boot 1:grub2 0:none::lvm fi # LVM parted -s -- $DISK0 set 3 lvm on logmsg "Load device mapper driver (for LVM)." modprobe dm-mod ### BEGIN LVM initialization commands -AR- ### logmsg "Initializing partition ${DISK0}3 for use by LVM." logmsg "pvcreate -M2 -ff -y ${DISK0}3 || shellout" pvcreate -M2 -ff -y ${DISK0}3 || shellout ### BEGIN LVM groups creation commands -AR- ### logmsg "lvremove -f /dev/mvg >/dev/null 2>&1 && vgremove mvg >/dev/null 2>&1" lvremove -f /dev/mvg >/dev/null 2>&1 && vgremove mvg >/dev/null 2>&1 logmsg "vgcreate -M2 -l 0 -p 0 -s 4096K mvg ${DISK0}3 || shellout" vgcreate -M2 -l 0 -p 0 -s 4096K mvg ${DISK0}3 || shellout ### BEGIN LVM volumes creation commands -AR- ### logmsg "lvcreate -L4194304K -n racine mvg || shellout" lvcreate -L4194304K -n racine mvg || shellout logmsg "lvscan > /dev/null; lvchange -a y /dev/mvg/racine || shellout" lvscan > /dev/null; lvchange -a y /dev/mvg/racine || shellout logmsg "lvcreate -L4194304K -n home mvg || shellout" lvcreate -L4194304K -n home mvg || shellout logmsg "lvscan > /dev/null; lvchange -a y /dev/mvg/home || shellout" lvscan > /dev/null; lvchange -a y /dev/mvg/home || shellout logmsg "lvcreate -L1949696K -n swap mvg || shellout" lvcreate -L1949696K -n swap mvg || shellout logmsg "lvscan > /dev/null; lvchange -a y /dev/mvg/swap || shellout" lvscan > /dev/null; lvchange -a y /dev/mvg/swap || shellout ### BEGIN swap and filesystem creation commands ### logmsg "mkswap /dev/mapper/mvg-swap || shellout" mkswap /dev/mapper/mvg-swap || shellout logmsg "swapon /dev/mapper/mvg-swap || shellout" swapon /dev/mapper/mvg-swap || shellout logmsg "mke2fs -T ext4 -q -j /dev/mapper/mvg-racine || shellout" mke2fs -T ext4 -q -j /dev/mapper/mvg-racine || shellout logmsg "mkdir -p /a/ || shellout" mkdir -p /a/ || shellout logmsg "mount /dev/mapper/mvg-racine /a/ -t ext4 -o defaults || shellout" mount /dev/mapper/mvg-racine /a/ -t ext4 || shellout logmsg "mke2fs -T ext4 -q -j /dev/mapper/mvg-home || shellout" mke2fs -T ext4 -q -j /dev/mapper/mvg-home || shellout logmsg "mkdir -p /a/home || shellout" mkdir -p /a/home || shellout logmsg "mount /dev/mapper/mvg-home /a/home -t ext4 -o defaults || shellout" mount /dev/mapper/mvg-home /a/home -t ext4 || shellout create_filesystem /dev/sda1 ext2 BOOT mkdir -p /a/boot && mount ${DISK0}1 /a/boot -t ext2 || shellout #logmsg "mount_disks" #mount_disks ## End disk creation and mounting ### BEGIN mount proc in image for tools like System Configurator ### ### BEGIN mount sysfs in image for tools that might be run during chroot ### logmsg "chroot_mount_system_fs" chroot_mount_system_fs ### END mount proc in image for tools like System Configurator ### ### END mount sysfs in image for tools that might be run during chroot ### ################################################################################ # # Lay the image down on the freshly formatted disk(s) # if [ ! -z $MONITOR_SERVER ]; then start_report_task fi ## Let's get the image # TODO: rewrite this so we can use PROTOCOL instead of using BITTORRENT yes/no logmsg "getimage" getimage # ################################################################################ # Leave notice of which image is installed on the client echo $IMAGENAME > /a/etc/systemimager/IMAGE_LAST_SYNCED_TO || shellout # ################################################################################ ################################################################## # # Uncomment the line below to leave your hostname blank. # Certain distributions use this as an indication to take on the # hostname provided by a DHCP server. The default is to have # SystemConfigurator assign your clients the hostname that # corresponds to the IP address the use during the install. # (If you used to use the static_dhcp option, this is your man.) # #HOSTNAME="" ################################################################################ # # Post Install Scripts # export DISK0 run_post_install_scripts # ################################################################################ ################################################################################ # # Save virtual console session in the imaged client # if [ ! -z $MONITOR_SERVER ]; then if [ "x$MONITOR_CONSOLE" = "xyes" ]; then [ ! -d /a/root ] && mkdir -p /a/root cp -f /tmp/si_monitor.log /a/root/si_monitor.log fi fi # ################################################################################ ################################################################################ # # Unmount filesystems # #logmsg "chroot_umount_system_fs" #chroot_umount_system_fs #logmsg "umount_disks" #umount_disks # ################################################################################ ################################################################################ # # Tell the image server we are done # rsync $IMAGESERVER::scripts/imaging_complete > /dev/null 2>&1 logmsg "Imaging completed" # ################################################################################ if [ ! -z $MONITOR_SERVER ]; then # Report the 'imaged' state to the monitor server. send_monitor_msg "status=100:speed=0" if [ "x$MONITOR_CONSOLE" = "xyes" ]; then # Print some empty lines and sleep some seconds to give time to # the virtual console to get last messages. # XXX: this is a dirty solution, we should find a better way to # sync last messages... -AR- logmsg "" logmsg "" logmsg "" sleep 10 fi # Report the post-install action. send_monitor_msg "status=104:speed=0" fi # Take network interface down [ -z $DEVICE ] && DEVICE=eth0 ifconfig $DEVICE down || shellout shellopen Le 20/12/2011 15:40, Jérémie Tétillon a écrit : Hi all, Thanks for the replies, i managed to create a lvm partition I have another problem, since i can't get grub to install .. error: cannot find a device for / (is /dev mounted?) here are my partition definition : partition $DISK0 1024:ext2:/boot:boot 1:grub_bios::grub 0:none::lvm it fails with the same error with a msdos or gpt label, with GRUB2=yes or GRUB2=no in my pxelinux.cfg Any ideas ? Le 09/11/2011 12:33, Jérémie Tétillon a écrit : Hello, We used systemimager for 4 years in my company and we decided to try sali as the old kernel/initrd doesn't work out with some of our servers. I'm trying to use the new master script and i can't figure out how to create a lvm partition Am i missing something ? is it even possible ? Any help would be nice -- Jérémie Tétillon Administrateur Systèmes et Réseaux E-Merchant Service IT / PIXMANIA Group 43 av. de la grande Armée 75116 Paris ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ sisuite-users mailing list sisuite-users@lists.sourceforge.net<mailto:sisuite-users@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/sisuite-users -- Jérémie Tétillon Administrateur Systèmes et Réseaux Tel: +33 1.45.01.42.44 j.tetil...@e-merchant.com<mailto:j.tetil...@e-merchant.com> E-Merchant Service IT / PIXMANIA Group 43 av. de la grande Armée 75116 Paris ------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join<http://appdeveloper.intel.com/join> http://p.sf.net/sfu/intel-appdev _______________________________________________ sisuite-users mailing list sisuite-users@lists.sourceforge.net<mailto:sisuite-users@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/sisuite-users -- Jérémie Tétillon Administrateur Systèmes et Réseaux Tel: +33 1.45.01.42.44 j.tetil...@e-merchant.com<mailto:j.tetil...@e-merchant.com> E-Merchant Service IT / PIXMANIA Group 43 av. de la grande Armée 75116 Paris ------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join<http://appdeveloper.intel.com/join> http://p.sf.net/sfu/intel-appdev _______________________________________________ sisuite-users mailing list sisuite-users@lists.sourceforge.net<mailto:sisuite-users@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/sisuite-users -- Jérémie Tétillon Administrateur Systèmes et Réseaux Tel: +33 1.45.01.42.44 j.tetil...@e-merchant.com<mailto:j.tetil...@e-merchant.com> E-Merchant Service IT / PIXMANIA Group 43 av. de la grande Armée 75116 Paris ------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join<http://appdeveloper.intel.com/join> http://p.sf.net/sfu/intel-appdev _______________________________________________ sisuite-users mailing list sisuite-users@lists.sourceforge.net<mailto:sisuite-users@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/sisuite-users -- Jérémie Tétillon Administrateur Systèmes et Réseaux Tel: +33 1.45.01.42.44 j.tetil...@e-merchant.com<mailto:j.tetil...@e-merchant.com> E-Merchant Service IT / PIXMANIA Group 43 av. de la grande Armée 75116 Paris ------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join<http://appdeveloper.intel.com/join> http://p.sf.net/sfu/intel-appdev_______________________________________________ sisuite-users mailing list sisuite-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sisuite-users -- Bas van der Vlies b...@sara.nl<mailto:b...@sara.nl> ------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev _______________________________________________ sisuite-users mailing list sisuite-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sisuite-users