Fix grub installs for 2.x
Merge branch 'master' of ssh://git.osuosl.org/var/git/ganeti-instance-image
Move boot_dir higher, and fix TARGET variables
deal with serial in karmic since it works differently
If the grub config is using UUID, ensure it gets updated
Other fixes include only skip setting up grub, don't skip setting up the serialstuff.
fix the path for lsb_release
fix sed command
Tell sed to follow symlinks
Use agetty instead of mingetty
Fix logic to be correct
Use lsb_release inside of a chroot of the VM
use if fi statments otherwise it exits with 1 and fails
Add missing $target in setup_fstab for get_os_type
Add proper console option to kernel options
Also fix grub-2.x so that it points to the correct file to munge, and also runupdate-grub once its done.
Add support for setting up serial consoles with grub
Add support for setting up the console automatically
Add get_os and get_os_release functions, refacter get_os_type
get_os: Returns the exact operating system
get_os_release: Returns the release of the operating system
Switch get_os_type to use an argument for the target location and also ensurethat it gets checked.
local can only be used in functions
Add support for setting up /etc/fstab properly
Fix dynamic partition to use its own function
I discovered that bash wasn't setting the environment variables correctly andrealized I need to refactor how I do this. Now I have a map_partition to figureout the exact path for a specific partition.
NOTE: fstabs are currently broken because of this addition
Remove quotes from device in the sfdisk command
Add optional support for no /boot partition
Allow for more flexibility for which partitions you need or what. It will allowfor four different partition layouts depending on whether you want a swappartition or booting a kernel outside of the VM.
Also merge the partition mapping for root_dev, boot_dev, & swap_dev entirely...
Only setup grub if there isn't a kernel set in kernel_path
Clean up interface setup
Adjust logic for when to setup grub
Deciding when to setup grub is a pain depending on several situations. Ifyou're using tarball, you may or may not use a kernel outside of theinstall. But if you're importing/exporting, you are still in a similarsituation. This logic should fix it hopefully.
Add initial support for dump/restore based images
Check both instance name with and without fdqn
Fix rename
Create temp directory for dumps
add -f to mkswap to remove warning message
Switch to having dump compress the images on the fly, fix a few bugs too
Fix logic which determines when to run grub by default
Improve and fix import/export to using separate dump files and tar
Also condense the code some more and reduce redundancy.
Don't format the disk during an export (mis-paste on my part)
Don't format the snapshot, kind of pointless
Make regex more clear and only do this on the end of the string
Add error checking to ensure we have filesystem types
Refactor debugging code to be saner and actually work
Move "main" actions below the functions so they know what they are
Move debug check until after we've sourced common.sh
Add rename support
Setup grub (if enabled) during an import
Go ahead and assume that dump will accept ext4. It will fail anyways if it can't
Add support for export
Add VOL_ID and VOL_TYPE back for export
Add support for import
Move mkfs into common.sh so that its portable to other scripts
Move OS detection to common.sh to make it portable for other scripts
Also refactor how we use it in interfaces
code cleanup, remove bits we don't use from the debootstrap import
Add documention regarding the partition layout
Update README doc
Add OSU Copyright headers
Force exit on error
Don't remove keys if deploying a debian based image
Debian generates the host keys during the install phase and the init scriptdoesn't regenerate them if they don't exist and fail. So skip it for now onthese types of systems.
Create IMAGE_DEBUG variable to enable debugging output
DEBUG_LEVEL isn't working yet in ganeti [1], so lets add an option so we can atleast use something.
[1] http://groups.google.com/group/ganeti/browse_thread/thread/948ec6705ae69798
don't escape characters when setting up the network
MAC addresses should always be uppercase
If debug is set, show commands in log file
check for OS's inside of the image, not the system itself. doh
Fix this correctly
Revert "don't set the DESTDIR"
This reverts commit 05362abf351ae65473c05acad0f924cc91edac1d.
don't set the DESTDIR
Adjust image naming scheme to deal with qemu-img image files
Check for qemu-img during install
Remove GRUB_SETUP and just assume you only need this for tarball image types
Make sure we source common.sh
New script to remove all ssh host keys
ensure that net.eth0 is enabled on gentoo
Add support for setting up networking on Gentoo, Redhat, Debian, and Suse based systems
For now it only supports DHCP
rename to correct name
change variable name to something more useful
fix typo
Make it optional whether to create and use a swap partition
rename variable to something more useful
Refactor grub install into a custom script
We only need to use grub for tarball based installs since images should includea disk with grub already installed.
Install custom scripts but don't enable (i.e. -x) them
Add basic support for qemu-img based images
Also refactor mounting into a common function
allow for the location of IMAGE_DIR to be changed by the user
fix paths for variants
Set the $disk variable up
Remove extra whitespace, errors out otherwise
Add volume label so that CentOS boots
May need to see how other distros need adjustments
Use grub directly to install MBR as grub-install won't work correctly
Add support for installing grub for an image
Put umount cleanup command in the correct place
Create $TMPDIR/boot after mounting root
Check to make sure the first partition exists
Use correct env variable for memory
Add --with-defaults-dir option
Some distros don't use /etc/defaults
Create image directory
Add image unpacking feature
Format the 3 volumes and mount them correctly
Create 3 partitions for /boot swap & / by default
Clean up Makefile
Clean out NEWS file
Add basic support for installing via a CD
remove caching code as its useless for this instance
Check for various important programs and set variables for them
Import from instance-debootstrap 17b5b2da0