source: MondoRescue/branches/stable/mondo/src/restore-scripts/mondo/label-partitions-as-necessary

Last change on this file was 1842, checked in by Bruno Cornec, 16 years ago
  • Fix lack of /etc/raidtab at restore rime in the right place
  • Adds support for nls_utf8 and pata_serverworks Patches from Dirk Husung (husung_at_tu-harburg.de)
  • Add efibootmgr to deplist.txt in order to be able to modify EFI menu at restore time on ia64
  • Usage of the new testver param of pb 0.8.12 to deliver 2.2.5 packages in a test dir.
  • Update pbcl files for upcoming delivery of 2.2.5
  • Fix an issue on parted output (K instead of KB) in parted2fdisk at restore time
  • Adds support for alb/aft types of bonding on Intel cards (Mark Pinkerton <Mark.Pinkerton_at_emageon.com>)
  • Escape variables in a perl script like mindi-bkphw
  • Better Proliant support at restore time now.
  • Fix a label bug where the variable label should also be re-initialized at each loop
  • start-nfs should NOT do exit => kernel panix as init exits
  • some other fixes for init on denymods
  • Adds boot options denymods (for udev) and forcemods (if not udev)
  • kqemu is denied. Probably should also be done for kvm stuff
  • Fix again the bug on modules link at root of the initrd. Hopefully for good.
  • Wait more around the USB CD emulated by iLO as it takes up to 5 seconds to come up
  • Attempt to fix udev support for RHEL 5.1
  • Better support for automatic iLO Virtual Media with udev
  • Some VMWare support improvements (however, it seems that VMWare support won't be possible anytime soon)
  • during init at restore time, copy all static evices availble for udev, as some distro implementation are no

t yet supported correctly for udev. Not very elegant, but should solve our current issues

  • Fedora 8 now supported as a build target for pb
  • svn.log removed.
  • dependencies reviewd for rhel_3
  • Attempt to fix the lack of modules loaded at restore time - especially fs device drivers
  • removes bkphw dir before potential creation
  • render mount command more vebose at restore time
  • Should fix #217
  • Increase BOOT_SIZE and EXTRA_SIZE to support features such as HW recovery
  • Handles udev.files files which could be symlinks
  • Improve udev support for distro with compressed modules (mdv e.g.)
  • Fix modules.dep copy
  • /sbin/pam_console_apply is needed by mdv udev conf
  • Adds support for nohw boot option to avoid re-setuping the HW conf
  • Improved support for Proliant on cpqacuxe
  • RstHW should be called after driver initialization
  • For debian/ubuntu mindi dpends on mindi-busybox
  • Update mindi-busybox pbcl for correct debian changelog generation, and up2date infos
  • Should fix #215
  • Fix #214 (Thanks to xdelaruelle)
  • Fix again svn.log not used anymore with new pb version
  • Adaptation of build process to upcoming 0.8.12 version of pb
  • Remove MONOTONIC clock to continue to support 2.4 kernels (RHEL 3 e.g. or ESX)
  • Attempt to solve ia64 BMC access through the serial port
  • parted2fdisk binary no more generated
  • do not require perl modules (strict.pm) at restore time
  • try to avoid modprobe messages at restore time
  • on ia64 now use the perl script parted2fdisk at retore time also
  • Also modprobe modules for udev after decompressing the additional ones
  • replace gzip -v9 by gzip -c9. Fix a bug at least on ia64
  • For all modules supported, create symlinks under the mountpoint and extract dev files as some are not automat ically created at the moment
  • Support /vmfs/volumes for ESX
  • Finally do not use vdf for ESX. Only creates issues.
  • Avoids continuing hw support if no product name found
  • Improves ia64 support for bootable image build
  • Fix a potential problem with ramdisk_blocksize param
  • MAKEDEV should also be included in deplist.txt
  • More fixes for udev support for Debian
  • Do not mount /boot if it's already mounted - avoids ESX hang
  • Fix NICs renumbering on Debian at least
  • Udev startup improvement to support iLO + NFS so modprobing all modules seems required as of now
  • Update to version 1.7.3 of busybox for pb
  • Load USB earlier in order to support KBD such as with iLO
  • Do busybox ldd first in order to create a potential /lib64 link correctly and then use it later in the image
  • Use variable DF in mindi to be able to support the ESX vdf
  • Fix mindi for Debian x86_64 where /lib64 is a link
  • Fix issue at restore time for ext2fs params not reused (Fix from Klaus Ade Johnstad <klaus_at_skolelinux.no>)
  • Do not copy udev files if they do not exist In udev case do not insert modules at all (udev should do it alone) May avoid the issue with rhel4.5 kernel ? To be tested
  • Update dependencies for rpm base build as well
  • And also perl is a debian/ubuntu dep
  • Better debian/ubuntu dependecies requirements (mtools)
  • Fix modes on mindi-bkphw (Thanks Phil Walker phil.walker_at_hp.com)
  • Complete rev [1771] for upper case RESTORE cli with syslinux as well
  • Update mindi-busybox to 1.7.3
  • Use RESTORE consistently across mondo to restore without interaction (report from Takeshi Shoji t.shoji_at_tripodw.jp)

(merge -r1769:1841 $SVN_M/branches/2.2.5)

  • Property svn:keywords set to Id
  • Property svn:unix-mode set to 755
File size: 1.8 KB
Line 
1#!/bin/sh
2#
3# $Id: label-partitions-as-necessary 1842 2007-12-15 01:24:34Z bruno $
4#
5############################################
6
7
8read_partition_line() {
9 local label mountpt command format
10
11 label=`echo "$1" | awk '{print $1}' | cut -d'=' -f2`
12 format=`echo "$1" | awk '{print $3}'`
13 mountpt=`awk '{print $1,$5}' $mountlist | grep " $label$" | awk '{print $1}'`
14
15 if [ "`echo "$1" | grep -E 'LABEL='`" != "" ] ; then
16 opttun="-L"
17 elif [ "`echo "$1" | grep -E 'UUID='`" != "" ] ; then
18 opttun="-U"
19 else
20 # Nothing to do
21 return
22 fi
23
24 if [ ! "$mountpt" ] ; then
25 LogIt "Not labeling anything as ($label) because ($mountpt) is not a mountpoint"
26 elif [ ! "$label" ] ; then
27 LogIt "Not labeling ($mountpt) as anything because ($label) is not a label"
28 else
29 if [ "$format" = "ext2" ] || [ "$format" = "ext3" ] ; then
30 command="tune2fs $opttun $label $mountpt"
31 LogIt "Running $command"
32 $command
33 elif [ "$format" = "swap" ] ; then
34 if [ "$opttun" = "-U" ]; then
35 LogIt "Creating uuid $label on swap partition $mountpt"
36 echo -n "$label" | perl -ne 's/-//g;chomp;print pack "H*",$_' | dd conv=notrunc "of=$mountpt" obs=1 seek=1036
37 else
38 command="mkswap $opttun $label $mountpt"
39 LogIt "Running $command"
40 $command
41 fi
42 else
43 LogIt "I am NOT going to run tune2fs: the partition is format '$format', which doesn't like tune2fs anyway"
44 fi
45 fi
46}
47
48
49# ---------------------------------------------
50
51LogIt "Identifying your drives with tune2fs"
52if [ "$#" -ne "1" ] ; then
53 LogIt "label-partitions-as-necessary /tmp/mountlist.txt < /tmp/fstab.new" 1
54 exit 1
55fi
56mountlist=$1
57noof_blank_lines=0
58read line
59while [ "$line" != "" ] && [ "$noof_blank_lines" -le "5" ] ; do
60 if [ "$line" = "" ] ; then
61 noof_blank_lines=$(($noof_blank_lines+1))
62 else
63 noof_blank_lines=0
64 read_partition_line "$line"
65 fi
66 read line
67done
68LogIt "Labeling complete."
69exit 0
Note: See TracBrowser for help on using the repository browser.