Home · About · Download · Documentation · Getting Help · Google+

Changeset 1280


Ignore:
Timestamp:
02/26/2013 02:53:15 PM (5 years ago)
Author:
jms
Message:

20-filesystems -- Adds in the ability to use 'fill' for a size. Be

sure it's the *last* entry in the FILESYSTEMS variable, or it won't
make you too happy. ;)

80-mkbootable -- So, I ran into an issue with 'grub-install' (SL

6.3)... it just didn't work. *BUT* running the commands to setup grub
manually did work. So, this is a hack to work around that. If
grub-install fails, it generates a small set of commands, that is ran
in the chroot, which is used as input to grub to setup the boot loader
that way. Any output is sent to: /root/grubinstall.out -- in
$NEWROOT.

Location:
trunk/provision/initramfs/capabilities/setup-filesystems
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/provision/initramfs/capabilities/setup-filesystems/20-filesystems

    r987 r1280  
    119119                            fi 
    120120                            if [ -n "$WWFS_SIZE" ]; then 
    121                                 SIZE="+${WWFS_SIZE}M" 
     121                                if [ "x$WWFS_SIZE" = "xfill" ]; then 
     122                                    SIZE="\n"; 
     123                                else 
     124                                    SIZE="+${WWFS_SIZE}M" 
     125                                fi 
    122126                            elif [ -n "$WWFS_END" ]; then 
    123127                                SIZE=$WWFS_END 
  • trunk/provision/initramfs/capabilities/setup-filesystems/80-mkbootable

    r1200 r1280  
    7171                        exit 0 
    7272                    else 
    73                         echo "Running grub-install failed!" 
    74                         exit 255 
     73                        gscript="/root/grubinstall.sh"; 
     74                        grubscript=${NEWROOT}${gscript}; 
     75                        grubtext=$NEWROOT/root/grubinstall.txt; 
     76 
     77                        echo -n "Running grub-install failed. Trying manually."; 
     78 
     79                        # Setup Commands to install GRUB 
     80                        echo "root (hd0,0)" > $grubtext; 
     81                        echo "setup (hd0)" >> $grubtext; 
     82                        echo "quit" >> $grubtext; 
     83 
     84                        # Bash script to run grub. 
     85                        echo "#!/bin/bash" > $grubscript; 
     86                        echo "/sbin/grub --batch < /root/grubinstall.txt &>/root/grubinstall.out" >> $grubscript; 
     87                        chmod 755 $grubscript; 
     88 
     89                        if chroot $NEWROOT $gscript &>/dev/null; then 
     90                            exit 0; 
     91                        else 
     92                            echo "Running grub-install failed!" 
     93                            exit 255 
     94                        fi 
    7595                    fi 
    7696                else 
     
    93113    exit 1 
    94114fi 
     115 
     116# vim: filetype=sh:syntax=sh:expandtab:ts=4:sw=4: 
     117 
Note: See TracChangeset for help on using the changeset viewer.