Posts

Showing posts with the label Boot

[ Level 3 ] The script for creating virtualbox envrionment (Ubuntu 12.04) with lauch new OS image.

In my company, I need to test it when I build a new image. Therefore I have to setup my testing environment for integration test. I wrote a script to automatically setup the environment from new install Ubuntu. The steps are: 1. Download and setup tftp server. 2. Download and setup dhcp server with netboot option. 3. Install virtualbox. After that you could create a VM then choose netboot. (the first interface must connect to tap0 to get boot server information) #!/bin/bash ######## utilities ######## _getTasks() { indent="$1" cat $0 | grep '()' | grep -v "^_" | grep "^[^ ]" | cut -d'(' -f1 | sed -e "s/^/$indent/" } _showUsage() { indent=" " cat <<EOF Usage: $0 task Ex. $0 `_getTasks | head -1` tasks: ${indent}[ all ] `_getTasks "$indent"` EOF } _die() { echo "$1" exit ${2:-1} } _checkID() { uid=`id | cut -d'(' -f1 | cut -d'=' -f2` [ $uid -ne ...

[Level 2] How to update Ubuntu boot menu (grub).

If you want to modify grub menu of Ubuntu, you have following steps to do: 1. Modify default grub configuration file. # vi /etc/default/grub 2. Update grub configuration. # update-grub Generating grub.cfg ... Found linux image: /boot/vmlinuz-2.6.38-12-generic Found initrd image: /boot/initrd.img-2.6.38-12-generic Found linux image: /boot/vmlinuz-2.6.38-8-generic Found initrd image: /boot/initrd.img-2.6.38-8-generic Found memtest86+ image: /boot/memtest86+.bin Found Windows Recovery Environment (loader) on /dev/sda1 Found Windows 7 (loader) on /dev/sda2 done # More info. please refer to here . Wish this helps. regards, Stanley Huang

[Level 3] Fix Windows7 MBR

bcdedit /export C:\BCD_Backup c: cd boot attrib bcd -s -h -r ren c:\boot\bcd bcd.old bootrec /RebuildBcd F8 -> repair -> command -> bootrec /fixmbr Wish this helps. regards, Stanley Huang