PDA

View Full Version : [ubuntu] Getting Rid of Windows 7



Labago
April 16th, 2011, 12:14 AM
I have had Ubuntu for a while and I've been trying to make it do everything for me that windows can and more. For the most part i have been succesful and i have been thinking of completely getting rid of Windows 7? Does anyone think this is a good idea and if so how would i go about doing this so i dont lose any data and can give linux all of the harddrive space on my laptop?

Hedgehog1
April 16th, 2011, 02:30 AM
Might I suggest shrink the Windows partition down to be 'just big enough to run' should you need it now and again, and then giving the extra space to Ubuntu?

If you would like specific instructions on partitions and whatnot, please do this:

From Ubuntu on the Disk:

http://bootinfoscript.sourceforge.net/
Follow the instruction on the website and post the results here.

Please press the '#' button when posting and place the the script results between the two 'CODE' tags.


The Hedge

:KS

Labago
April 16th, 2011, 08:13 PM
Here are the results from the link you sent me, after running the script i donwloaded i got the text file contents below:



Boot Info Script 0.55 dated February 15th, 2010

============================= Boot Info Summary: ==============================

=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in
partition #5 for /boot/burg.

sda1: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files/dirs: /bootmgr /boot/bcd

sda2: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows 7
Boot files/dirs: /bootmgr /Boot/BCD /Windows/System32/winload.exe

sda3: __________________________________________________ _______________________

File system: Extended Partition
Boot sector type: Unknown
Boot sector info:

sda5: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu natty (development
branch)
Boot files/dirs: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda6: __________________________________________________ _______________________

File system: swap
Boot sector type: -
Boot sector info:

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sda1 2,048 22,317,055 22,315,008 27 Hidden HPFS/NTFS
/dev/sda2 * 22,317,056 559,906,316 537,589,261 7 HPFS/NTFS
/dev/sda3 565,370,878 625,141,759 59,770,882 5 Extended
/dev/sda5 565,370,880 622,585,855 57,214,976 83 Linux
/dev/sda6 622,587,904 625,141,759 2,553,856 82 Linux swap / Solaris


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/sda1 AA36A00C369FD7A1 ntfs Recovery
/dev/sda2 10D24F12D24EFC0A ntfs Vista
/dev/sda3: PTTYPE="dos"
/dev/sda5 0c87bb92-77fb-4dca-a916-bfc5a1990c30 ext4
/dev/sda6 b9e039b6-8e09-4ff5-bcf0-93b3ed7036b5 swap
/dev/sda: PTTYPE="dos"

============================ "mount | grep ^/dev output: ===========================

Device Mount_Point Type Options

/dev/sda5 / ext4 (rw,errors=remount-ro,commit=0)


=========================== sda5/boot/grub/grub.cfg: ===========================

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}

function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}

function load_video {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 0c87bb92-77fb-4dca-a916-bfc5a1990c30
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 0c87bb92-77fb-4dca-a916-bfc5a1990c30
set locale_dir=($root)/boot/grub/locale
set lang=en_US
insmod gettext
if [ "${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 44,0,30; then
clear
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
if [ ${recordfail} != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 2.6.38-8-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 0c87bb92-77fb-4dca-a916-bfc5a1990c30
linux /boot/vmlinuz-2.6.38-8-generic-pae root=UUID=0c87bb92-77fb-4dca-a916-bfc5a1990c30 ro quiet splash vt.handoff=7
initrd /boot/initrd.img-2.6.38-8-generic-pae
}
menuentry 'Ubuntu, with Linux 2.6.38-8-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 0c87bb92-77fb-4dca-a916-bfc5a1990c30
echo 'Loading Linux 2.6.38-8-generic-pae ...'
linux /boot/vmlinuz-2.6.38-8-generic-pae root=UUID=0c87bb92-77fb-4dca-a916-bfc5a1990c30 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.38-8-generic-pae
}
submenu "Previous Linux versions" {
menuentry 'Ubuntu, with Linux 2.6.35-25-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 0c87bb92-77fb-4dca-a916-bfc5a1990c30
linux /boot/vmlinuz-2.6.35-25-generic-pae root=UUID=0c87bb92-77fb-4dca-a916-bfc5a1990c30 ro quiet splash vt.handoff=7
initrd /boot/initrd.img-2.6.35-25-generic-pae
}
menuentry 'Ubuntu, with Linux 2.6.35-25-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 0c87bb92-77fb-4dca-a916-bfc5a1990c30
echo 'Loading Linux 2.6.35-25-generic-pae ...'
linux /boot/vmlinuz-2.6.35-25-generic-pae root=UUID=0c87bb92-77fb-4dca-a916-bfc5a1990c30 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-25-generic-pae
}
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/10_linux_proxy ###
menuentry "Ubuntu, with Linux 2.6.38-8-generic-pae" --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 0c87bb92-77fb-4dca-a916-bfc5a1990c30
linux /boot/vmlinuz-2.6.38-8-generic-pae root=UUID=0c87bb92-77fb-4dca-a916-bfc5a1990c30 ro quiet splash
initrd /boot/initrd.img-2.6.38-8-generic-pae
}
menuentry "Ubuntu, with Linux 2.6.38-8-generic-pae (recovery mode)" --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 0c87bb92-77fb-4dca-a916-bfc5a1990c30
echo 'Loading Linux 2.6.38-8-generic-pae ...'
linux /boot/vmlinuz-2.6.38-8-generic-pae root=UUID=0c87bb92-77fb-4dca-a916-bfc5a1990c30 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.38-8-generic-pae
}
### END /etc/grub.d/10_linux_proxy ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows Recovery Environment (loader) (on /dev/sda1)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(/dev/sda,msdos1)'
search --no-floppy --fs-uuid --set=root AA36A00C369FD7A1
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry "Windows 7 (loader) (on /dev/sda2)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(/dev/sda,msdos2)'
search --no-floppy --fs-uuid --set=root 10D24F12D24EFC0A
chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_os-prober_proxy ###
menuentry "Windows Recovery Environment (loader) (on /dev/sda1)" {
insmod part_msdos
insmod ntfs
set root='(/dev/sda,msdos1)'
search --no-floppy --fs-uuid --set=root AA36A00C369FD7A1
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry "Windows 7 (loader) (on /dev/sda2)" {
insmod part_msdos
insmod ntfs
set root='(/dev/sda,msdos2)'
search --no-floppy --fs-uuid --set=root 10D24F12D24EFC0A
chainloader +1
}
### END /etc/grub.d/30_os-prober_proxy ###

=============================== sda5/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda5 during installation
UUID=0c87bb92-77fb-4dca-a916-bfc5a1990c30 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda6 during installation
UUID=b9e039b6-8e09-4ff5-bcf0-93b3ed7036b5 none swap sw 0 0

=================== sda5: Location of files loaded by Grub: ===================


315.3GB: boot/grub/core.img
309.1GB: boot/grub/grub.cfg
309.6GB: boot/initrd.img-2.6.35-25-generic-pae
316.4GB: boot/initrd.img-2.6.38-8-generic-pae
316.1GB: boot/vmlinuz-2.6.35-25-generic-pae
311.3GB: boot/vmlinuz-2.6.38-8-generic-pae
316.4GB: initrd.img
311.3GB: vmlinuz
=========================== Unknown MBRs/Boot Sectors/etc =======================

Unknown BootLoader on sda3

00000000 09 41 33 01 a8 ab 18 22 02 aa 9a 88 28 03 79 0e |.A3...."....(.y.|
00000010 36 00 27 91 fc bc 09 22 12 88 18 30 53 24 91 cb |6.'...."...0S$..|
00000020 99 08 a9 28 53 a1 ce 9a 28 11 90 ca 9b 60 43 01 |...(S...(....`C.|
00000030 bb 0b 9e ee 36 00 cc a9 0d 77 17 80 a9 aa 09 22 |....6....w....."|
00000040 02 ec ab 18 34 13 01 aa 9b 21 33 91 9a 09 ba 09 |....4....!3.....|
00000050 75 23 a0 df ab 00 82 d4 46 00 22 81 98 88 21 45 |u#......F."...!E|
00000060 23 a8 ab 8a 80 00 32 02 de cb 8a 21 11 ba cc 08 |#.....2....!....|
00000070 34 43 a2 cb db 9b 8b 75 77 01 ce 70 52 00 98 aa |4C.....uw..pR...|
00000080 89 10 22 d8 ad 0a 31 24 11 98 ba 18 33 12 a8 99 |.."...1$....3...|
00000090 99 9a 62 35 83 fa af 89 11 02 90 88 08 01 0e f8 |..b5............|
000000a0 3e 00 45 02 a9 99 89 08 31 34 f9 bb ab 18 13 90 |>.E.....14......|
000000b0 dc 9b 41 23 23 b0 dc ac 9b 74 57 02 a8 ab 8a 20 |..A##....tW.... |
000000c0 23 08 68 0c 43 00 ef 89 21 22 01 90 99 08 22 13 |#.h.C...!"....".|
000000d0 80 80 c8 ac 48 36 13 f9 bc 0a 20 11 a8 99 09 52 |....H6.... ....R|
000000e0 44 02 80 98 89 09 b8 0a 3b 00 30 35 b0 bf 9c 18 |D.......;.05....|
000000f0 21 80 eb aa 10 43 11 98 b9 bc 9a 76 47 11 a8 bb |!....C.....vG...|
00000100 99 21 24 d9 ae 9a 31 23 01 08 67 f9 45 00 9a 10 |.!$...1#..g.E...|
00000110 32 23 80 21 c8 bc 49 46 23 d8 bd 9a 10 12 a8 ab |2#.!..IF#.......|
00000120 9a 41 45 13 81 08 88 98 40 36 a0 cd ab 08 f5 ee |.AE.....@6......|
00000130 40 00 21 11 eb bb 08 32 13 80 c9 bd 8a 75 47 11 |@.!....2.....uG.|
00000140 98 ca 89 10 33 d8 bd 9b 30 33 02 a0 bb 08 53 23 |....3...03....S#|
00000150 00 01 d4 11 3c 00 90 bb 49 47 33 b1 bf 9c 18 12 |....<...IG3.....|
00000160 a8 bb ab 08 45 24 01 88 08 10 30 46 01 db ac 89 |....E$....0F....|
00000170 21 12 c9 bd 8b 00 5f de 3d 00 22 80 b9 be 9b 73 |!....._.=."....s|
00000180 67 12 80 aa 9b 10 53 a1 be bb 18 24 12 90 ca 89 |g.....S....$....|
00000190 20 23 01 10 88 a8 38 67 33 03 e4 42 40 00 da bc | #....8g3..B@...|
000001a0 8a 22 82 db ac 8a 28 34 23 a8 8a 21 42 45 23 a8 |."....(4#..!BE#.|
000001b0 be 8b 20 33 92 dd bc 89 20 01 a9 dd aa 09 00 fe |.. 3.... .......|
000001c0 ff ff 83 fe ff ff 02 00 00 00 00 08 69 03 00 fe |............i...|
000001d0 ff ff 05 fe ff ff 02 08 69 03 00 00 27 00 00 00 |........i...'...|
000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
00000200

Hedgehog1
April 17th, 2011, 10:32 PM
Thanks for posting the script output. You did it perfectly!

You have a fairly standard install (which is good).


Partition Boot Start End Size Id System

/dev/sda1 2,048 22,317,055 22,315,008 27 Hidden HPFS/NTFS
/dev/sda2 * 22,317,056 559,906,316 537,589,261 7 HPFS/NTFS
/dev/sda3 565,370,878 625,141,759 59,770,882 5 Extended
/dev/sda5 565,370,880 622,585,855 57,214,976 83 Linux
/dev/sda6 622,587,904 625,141,759 2,553,856 82 Linux swap / Solaris

The idea is that the partitions stay in the order they are, we just shrink the Windows partition /dev/sda2 as much as we can, and give that space to Ubuntu. If find out how much you can shrink the Windows, please do this:

Boot Windows and do two things to the 'C:' drive (1) defrag the drive and (2) figure out how much space is used, and then add 5 gigs to that. The 'space really used' + 5 gigs will be the new size of the /dev/sda2 partition.

Now we start 'resizing/moving' partitions.

Please boot of your Ubuntu LiveCD/LiveUSB (You can use either your Natty one, or a 10.10 one for this). Select 'TRY'.

Menu to System >> Administration >> Gparted Partition Editor.

Select your hard drive (it may not be /dev/sda when booting from a LiveUSB).

Right click on the 'swap' partition on the hard drive and select 'swapoff' if it shows (it may already be off). Also if any partitions on the hard drive are showing a 'key' icon, that means they are mounted and you need to unmount them by right clicking on them and selecting 'unmount'

Right click on the /dev/sdx2 partiton and select 'move/resize', and shrink the NFTS Windows partition down to 'Used Space' + 5 gigs size. Press the check mark button to make it real. This may take a while. Go have a snack or walk the dog...

One that is done, you will need to resize the logical partition /dev/sdx3 to use all the new space. Right click on it, and select 'move'resize' to do that. Press the check mark button to make it real - this one will finish quickly.

The last gparted step is to move/resize the Ubuntu partition /dev/sdx5 to fill the new space in the extended partition. Right click on the partition and select 'move/resize'. Press the check mark button to make it real. This will take a little while to run.

Once this last step is done, the unused space from Windows is now in Ubuntu.

When you first boot windows, it will want to do a disk check. That is OK, please let it. It may reboot once during the disk check, that is normal.

Otherwise, you are ready to go!


The Hedge

:KS

p.s. if you want, you can delete unused files/data in Windows before you do the defrag to get more space.