2010-10-03, 10:10 PM (This post was last modified: 2010-10-04, 04:34 AM by singularity.)
When you delete /dev/sdb5, the other logical partitions will be renumbered. Because of the renumbering that will take place, you can't have any partition with a number > 5 loaded, so you can't delete it from your Ubuntu on /dev/sdb7 -- so you'll need to do it from the Ubuntu CD, Windows, etc.
-----
Also, you'll want to make sure your /etc/fstab is mounting by UUID -- because /dev/sdb7 will be something else (/dev/sdb5 or /dev/sdb6) after you delete the /dev/sdb5 partition.
From a terminal,
>> sudo gedit /etc/fstab
In your /etc/fstab, if a line begins with "/dev/sdb7", then you need to replace it with "UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx". Leave the rest of the line alone. If no lines have "/dev/sdb7", then you're already good to go.
If you need to determine the UUID of /dev/sdb7, open a new terminal:
>> blkid | grep sdb7
You should get an output like:
/dev/sdb7: UUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" TYPE="ext4"
Copy the UUID hexadecimal code to /etc/fstab.
I thought about this some more. If you go ahead and delete /dev/sdb5, then renumbering of your other logical partitions is going to cause your /dev/sdb7 Ubuntu to fail to boot. If you still really want to remove the unnecessary Ubuntu entries and/or reclaim that ~100GiB, then some of your options are as below:
-----
If you just want to hide the boot entries for Ubuntu on /dev/sdb5, then you can manually edit GRUB2's config. To edit GRUB2's configuration file, follow the directions of the last bullet point here: https://wiki.ubuntu.com/Grub2#User-defined%20Entries .[INDENT]Some of the cons are going to be that you won't be able to use that 100GiB and the entries will probably come back after kernel updates or any other time update-grub is run. On the up-side, you're free to reclaim that space by deleting all old Ubuntu installs when installing Ubuntu 10.10 -- which should be on 10/10/10 (less than a week from now).
[/INDENT]A simple way to reclaim that space (and update your grub menu) is to reformat /dev/sdb5 and have it mounted to its own directory. Then when you run "sudo update-grub", the only Ubuntu detected will be your preferred one on /dev/sdb7.[INDENT]If you then want it automatically mounted during boot, you can add an entry for it to /etc/fstab. Wikipedia's article details the formatting of fstab: http://en.wikipedia.org/wiki/Fstab
[/INDENT]The other simple way to reclaim the space is to redo the installation procedure. Make sure to choose manual partitioning so you can delete all of /dev/sdb5 through /dev/sdb8. Then create a new partition for swap and / in the now unallocated space. (Since Ubuntu 10.10 comes out in less than a week, I wouldn't recommend this now.)
Is updating from Ubuntu 10.4 to 10.10 like Vista to Windows 7, or is it just a large update pack? It seems really inefficient to require clean installs but that is the impression I get from your post.
I like the sound of your second option. It would work like a separate Harddrive, right? The space is still usable though, so until I need room for a 300 GB file or something, I do not see any problems with it.
What happens if I do not have it mounted automatically during boot? Does it not load for any OS or does it just take a little longer when I want to access something (for the first time on that power-on)?
I right click on the unallocated space and select "Format to", but it brings up a long list of types I know nothing about.
Could I back up my current Ubuntu, pop it in a safe spot, format all of my un-used partitions and merge them into one, reinstall Ubuntu, and then restore my files and settings?
Yeah. Backing up your /home directory should do the trick, as far as files and settings go. You'll have to reinstall any software you had, though.
Also for reformatting the other partition you probably should choose whatever format it currently is (ext3 I think?) and then choose some random mount point for it.
Russt Wrote:Yeah. Backing up your /home directory should do the trick, as far as files and settings go. You'll have to reinstall any software you had, though.
Also for reformatting the other partition you probably should choose whatever format it currently is (ext3 I think?) and then choose some random mount point for it.
You might want to backup the /etc folder for reference purposes if you changed any settings in configuration files and may need to look at them again to restore any settings you may have had set a custom way. You don't need to restore the /etc files, just see whats they may or may not have had you had customized and re-edit the existing ones if needed.
Hazzy Wrote:Is updating from Ubuntu 10.4 to 10.10 like Vista to Windows 7, or is it just a large update pack? It seems really inefficient to require clean installs but that is the impression I get from your post.
As for fixing GRUB vs. clean install, the main thing is that I don't want you to get left at GRUB's command line due to GRUB not being able to find Ubuntu's root directory. If you still want to pursue the fix GRUB (if necessary) option, then these directions should work: https://wiki.ubuntu.com/Grub2#Recover%20Grub%202%20via%20LiveCD .
Note that you'll have to reboot in between deleting /dev/sdb5 and growing your current sdb7 + following those directions. Then instead of sdaX, it should be sdbX where X is the partition number of sdb7 if/after it is renumbered. The grub-install line should point to the hard disk that the BIOS gives priority to during boot.
To summarize the major steps for the fix GRUB2 option:
1. Make sure /etc/fstab uses UUID to mount /
2. Reboot to Ubuntu Live CD or another partition manager. Delete /dev/sdb5 (and possibly also /dev/sdb6).
3. Reboot so /dev/sdb7 and /dev/sdb8 get their new number.
4. Go back to Ubuntu Live CD or that other partition manager.
5. Move and/or resize your remaining Ubuntu's partitions.
6. Restore/fix GRUB2.
As you can see, doing a clean install has less steps so there are less possible things that might go wrong.
Hazzy Wrote:I like the sound of your second option. It would work like a separate Harddrive, right? The space is still usable though, so until I need room for a 300 GB file or something, I do not see any problems with it.
What happens if I do not have it mounted automatically during boot? Does it not load for any OS or does it just take a little longer when I want to access something (for the first time on that power-on)?
I right click on the unallocated space and select "Format to", but it brings up a long list of types I know nothing about.
It'd be a separate partition... When everything is setup, accessing it is very seamless.
To illustrate, here's what you could do:
>> mkdir /home/chris/data
>> mount /dev/sdb5 /home/chris/data
or
>> mkdir /mnt/data
>> mount /dev/sdb5 /mnt/data
Or use whatever directory that you want. And you can access anything stored on that partition in the specified directory.
If it doesn't get mounted automatically at boot, you'd have to manually mount the directory to your specified folder. If you let the system automatically mount the partition when you access it (via Nautilus or another file manager), it would usually get mounted at /media/xxxxxxxx (or /mnt instead of /media) where the x's are some randomly generated sequence of hexadecimal/alphanumeric characters. So it would be different every time.
Format to ext3 or ext4. (Personally, I'd format to ext4.)
Hazzy Wrote:Could I back up my current Ubuntu, pop it in a safe spot, format all of my un-used partitions and merge them into one, reinstall Ubuntu, and then restore my files and settings?
The other posters covered this, reiterating.. All personal settings should be saved at /home. Save a copy of everything you changed in /etc so you can easily reapply those changes (if necessary) later on.
Personally, I'd reformat that /dev/sdb5 and make it a new /home directory (transferring the current /home over -- most importantly all hidden files+folders). Then when you update Ubuntu or even try other Linux distributions, most/all your settings should be transferred over -- as long as you specify that partition as /home during installation. Also, all data you keep on /home should be safe because the partition won't be touched during install.
Or the booting, at least. I installed Linux Mint out of curiosity. I preferred Ubuntu, so I formatted the partition Mint was on and what I think was it's Linux-swap. The computer functioned just fine until I tried to reboot.
It starts out with normal BIOS(?) stuff, "Loading Operating System..." for a bit... and then breaks. It says something about not being able to find device, list a long UUID, then goes into grub rescue. I spent around an hour or so Googling about this and have come up with nothing. Internet tells me to do this, I do, nothing happens. Internet tells me to do that, the file does not exist, nothing happens. I was Googling via my mom's laptop, and I am currently posting this from Firefox on the LiveCD (demo).
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 102400 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2 13 60802 488282112 7 HPFS/NTFS
Partition 2 does not end on cylinder boundary.
Device Boot Start End Blocks Id System
/dev/sdd1 1 121601 976760001 c W95 FAT32 (LBA)
Boot Info Script
Spoiler
Code:
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 #9 for /boot/grub.
=> Grub 0.97 is installed in the MBR of /dev/sdb and looks on the same drive
in partition #5 for /boot/grub/stage2 and /boot/grub/menu.lst.
=> Windows is installed in the MBR of /dev/sdd
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
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: /Windows/System32/winload.exe
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: /Windows/System32/winload.exe
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/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
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
}
insmod ext2
set root='(hd1,7)'
search --no-floppy --fs-uuid --set 6c15b8d5-d0bf-4ec6-943e-6bd15656e525
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=1024x768
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
insmod ext2
set root='(hd1,7)'
search --no-floppy --fs-uuid --set 6c15b8d5-d0bf-4ec6-943e-6bd15656e525
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=3
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
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-25-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd1,7)'
search --no-floppy --fs-uuid --set 6c15b8d5-d0bf-4ec6-943e-6bd15656e525
linux /boot/vmlinuz-2.6.32-25-generic root=UUID=6c15b8d5-d0bf-4ec6-943e-6bd15656e525 ro splash vga=795 quiet splash
initrd /boot/initrd.img-2.6.32-25-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-25-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd1,7)'
search --no-floppy --fs-uuid --set 6c15b8d5-d0bf-4ec6-943e-6bd15656e525
echo 'Loading Linux 2.6.32-25-generic ...'
linux /boot/vmlinuz-2.6.32-25-generic root=UUID=6c15b8d5-d0bf-4ec6-943e-6bd15656e525 ro single splash vga=795
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-25-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-24-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd1,7)'
search --no-floppy --fs-uuid --set 6c15b8d5-d0bf-4ec6-943e-6bd15656e525
linux /boot/vmlinuz-2.6.32-24-generic root=UUID=6c15b8d5-d0bf-4ec6-943e-6bd15656e525 ro splash vga=795 quiet splash
initrd /boot/initrd.img-2.6.32-24-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-24-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd1,7)'
search --no-floppy --fs-uuid --set 6c15b8d5-d0bf-4ec6-943e-6bd15656e525
echo 'Loading Linux 2.6.32-24-generic ...'
linux /boot/vmlinuz-2.6.32-24-generic root=UUID=6c15b8d5-d0bf-4ec6-943e-6bd15656e525 ro single splash vga=795
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-24-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd1,7)'
search --no-floppy --fs-uuid --set 6c15b8d5-d0bf-4ec6-943e-6bd15656e525
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd1,7)'
search --no-floppy --fs-uuid --set 6c15b8d5-d0bf-4ec6-943e-6bd15656e525
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda1)" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set daee43a6ee4379b1
chainloader +1
}
menuentry "Ubuntu, with Linux 2.6.32-25-generic (on /dev/sdb5)" {
insmod ext2
set root='(hd1,5)'
search --no-floppy --fs-uuid --set e302aa9b-9b4d-45c1-b27f-f57bb0c8dbf8
linux /boot/vmlinuz-2.6.32-25-generic root=UUID=e302aa9b-9b4d-45c1-b27f-f57bb0c8dbf8 ro quiet splash
initrd /boot/initrd.img-2.6.32-25-generic
}
menuentry "Ubuntu, with Linux 2.6.32-25-generic (recovery mode) (on /dev/sdb5)" {
insmod ext2
set root='(hd1,5)'
search --no-floppy --fs-uuid --set e302aa9b-9b4d-45c1-b27f-f57bb0c8dbf8
linux /boot/vmlinuz-2.6.32-25-generic root=UUID=e302aa9b-9b4d-45c1-b27f-f57bb0c8dbf8 ro single
initrd /boot/initrd.img-2.6.32-25-generic
}
menuentry "Ubuntu, with Linux 2.6.32-24-generic (on /dev/sdb5)" {
insmod ext2
set root='(hd1,5)'
search --no-floppy --fs-uuid --set e302aa9b-9b4d-45c1-b27f-f57bb0c8dbf8
linux /boot/vmlinuz-2.6.32-24-generic root=UUID=e302aa9b-9b4d-45c1-b27f-f57bb0c8dbf8 ro quiet splash
initrd /boot/initrd.img-2.6.32-24-generic
}
menuentry "Ubuntu, with Linux 2.6.32-24-generic (recovery mode) (on /dev/sdb5)" {
insmod ext2
set root='(hd1,5)'
search --no-floppy --fs-uuid --set e302aa9b-9b4d-45c1-b27f-f57bb0c8dbf8
linux /boot/vmlinuz-2.6.32-24-generic root=UUID=e302aa9b-9b4d-45c1-b27f-f57bb0c8dbf8 ro single
initrd /boot/initrd.img-2.6.32-24-generic
}
menuentry "Linux Mint 9, 2.6.32-21-generic (/dev/sdb9) (on /dev/sdb9)" {
insmod ext2
set root='(hd1,9)'
search --no-floppy --fs-uuid --set f1fa46b2-fe30-4d00-ac70-1d7beac61d48
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=f1fa46b2-fe30-4d00-ac70-1d7beac61d48 ro quiet splash
initrd /boot/initrd.img-2.6.32-21-generic
}
menuentry "Linux Mint 9, 2.6.32-21-generic (/dev/sdb9) -- recovery mode (on /dev/sdb9)" {
insmod ext2
set root='(hd1,9)'
search --no-floppy --fs-uuid --set f1fa46b2-fe30-4d00-ac70-1d7beac61d48
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=f1fa46b2-fe30-4d00-ac70-1d7beac61d48 ro single
initrd /boot/initrd.img-2.6.32-21-generic
}
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
# /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/sdb7 during installation
UUID=6c15b8d5-d0bf-4ec6-943e-6bd15656e525 / ext4 errors=remount-ro 0 1
# swap was on /dev/sdb8 during installation
UUID=4f2cc65f-a8c2-40ae-8e15-62e22e8a2e52 none swap sw 0 0
=================== sdb7: Location of files loaded by Grub: ===================
00000000 93 70 68 86 25 cd e7 39 ae 90 ee 4e cc 77 20 9f |.ph.%..9...N.w .|
00000010 61 d4 a2 8c 1a 77 4b fe 55 e0 69 15 8e e8 5e e4 |a....wK.U.i...^.|
00000020 ce c0 32 72 ea 56 f8 35 ca 3d b0 92 38 39 db f7 |..2r.V.5.=..89..|
00000030 c6 7c 68 9a 98 a8 09 4f 53 26 ba c9 78 74 8b b1 |.|h....OS&..xt..|
00000040 17 1f 06 e1 bc d1 cf 1d 21 70 35 44 4e 4a 44 2d |........!p5DNJD-|
00000050 aa c6 bd bf 70 3f 34 a3 11 1c 33 bb 84 8d 78 ce |....p?4...3...x.|
00000060 15 8e 94 86 1d ea 7f d1 57 e3 f5 6e 81 97 65 71 |........W..n..eq|
00000070 4a 5c 9b af a4 e9 62 a1 86 89 24 50 7e ee b8 d2 |J\....b...$P~...|
00000080 b7 f1 68 5c c4 28 3b 75 1e 33 54 ae 5a eb 93 7d |..h\.(;u.3T.Z..}|
00000090 47 83 3c a6 ce ae 9c 9d d3 04 5b 8f fe 2a ff 47 |G.<.......[..*.G|
000000a0 1e 6a 3d 7e 8c f4 bf d8 4c 7c 6f 6e 4f 9b 0e 7e |.j=~....L|onO..~|
000000b0 61 bf 62 b4 60 8e c7 49 93 f1 a3 ce c2 49 9f c2 |a.b.`..I.....I..|
000000c0 54 c6 49 63 6d 7e 93 d4 6e cb 4a e3 73 2d d6 92 |T.Icm~..n.J.s-..|
000000d0 0b 4e 80 55 bc a8 59 1e 73 0c 02 33 63 21 c2 f8 |.N.U..Y.s..3c!..|
000000e0 16 1d 9d 40 86 40 7c ba d8 03 fe 36 95 12 3d 11 |...@.@|....6..=.|
000000f0 68 c5 29 bd 6d a3 d7 9e 1e 9e 2a c8 34 a1 d3 03 |h.).m.....*.4...|
00000100 d4 c8 3b 40 42 32 fc ee 72 09 78 b1 a7 85 c8 9c |..;@B2..r.x.....|
00000110 37 61 c0 ba 09 3f 9c f2 7f 98 19 a3 15 2e 81 a3 |7a...?..........|
00000120 65 f2 40 b8 3c 7b a3 66 d5 72 00 80 db ab f4 e8 |e.@.<{.f.r......|
00000130 a5 5d f0 9a 80 f0 0f cc 5f 49 9c 9e 0a 80 14 a7 |.]......_I......|
00000140 dc 76 2b ca 34 ca 5a 28 34 80 fe a3 63 69 3b f9 |.v+.4.Z(4...ci;.|
00000150 de ef 85 a1 ab 47 26 61 ce 18 7a 32 a8 b0 1e 1e |.....G&a..z2....|
00000160 f8 3a 88 3a d0 88 91 00 2a 26 f0 ea d6 cc fc 12 |.:.:....*&......|
00000170 20 fe 82 8d de 33 6c 48 bb 63 fb c4 0a df 2a 89 | ....3lH.c....*.|
00000180 10 43 d0 dd f0 5f 4e 9e 38 96 eb bb ad a9 0c 74 |.C..._N.8......t|
00000190 f1 a5 6c 35 24 a8 49 61 4a 49 17 b4 ed 78 30 e6 |..l5$.IaJI...x0.|
000001a0 71 11 49 b8 f3 f9 4a 60 e9 66 c0 c4 12 e4 49 25 |q.I...J`.f....I%|
000001b0 ef 01 e2 00 c1 b3 2e 6e 79 d7 f3 c6 03 33 00 fe |.......ny....3..|
000001c0 ff ff 83 fe ff ff 02 10 9d 06 b0 ab 86 06 00 fe |................|
000001d0 ff ff 05 fe ff ff 4c f9 4b 13 b6 0e 8b 00 00 00 |......L.K.......|
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
=======Devices which don't seem to have a corresponding hard drive==============
sdc
I have to be somewhere soon, so I apologize for not being able to provide more information. When I get back, I will register on the Ubuntu forums to see how they can help. SP has techy people and I do not have to deal with registering and finding the right forum and all that. Thanks