Errors reinstalling 14.04, dual boot with XP
An XP refugee and noob, I've just installed Trusty on 3 older Thinkpads (sole OS on an T60, and dual boot on two X60s). I did my research best I could, and have really enjoyed the process. Solving all the little problems that have come up - learning a lot. My data is well backed up, so I have the luxury of making mistakes ... and I'm makin' em.
One of the X60s showed serious boot problems (excruciatingly long boot time) and persistent slowness / freezes. If I were more knowledgeable, I'd probably have known how to do diagnostics, etc... but I didn't have the time or patience to learn this right now. So I reinstalled Trusty from the disc, making no changes in partitions.
I imagined that the NTFS partition would remain unchanged, that a reinstall "into" the original ubuntu partition would preserve my documents and most of my installed software, while reverting all settings to default.
What I found (and this may not be news to non-noobs) was that the initial install was not overwritten; rather, all extant files were given a separate 28 GB partition. And *another* partition was created for the new install. So I now have two 'Computer' directories (bin, boot...var). This was not clear to me in the diagram presenting the partitions via the install disc.
(a) is there any disadvantage to using GParted to delete the partitions containing the original install? There is nothing there that I need, and I'd prefer to have a 55 contiguous GB for Trusty. Clearly, I'd have to read up on partitions... (b) is the version of GParted available from the Software Center sufficient? (I have downloaded the ISO, but don't have a cd burner at the moment).
Thanks!
Re: newbie's errors reinstalling 14.04, dual boot with XP
You usually cannot use a gparted on your working system as you have partitions mounted. I do install it but only work on another drive.
You need to use a Live installer. It was on what ever installer you used if Ubuntu, not sure about all flavors.
But if you still have your live installer that will work.
You also may have to click on swap and right click swap off. Installer in live mode likes to mount swap if found to speed things up a bit. And swap is often in the extended partition which in effect mounts the entire extended partition.
I generally do not like moving partitions left. It is slow as all data must be copied. And any interruption will totally corrupt data.
Be glad you do not have a new UEFI system. Reinstall on those just shows Ubuntu and users think they are overwriting just Ubuntu when the entire drive is overwritten. Not sure if Ubuntu installer, or user, but may be related to Windows 8 always in hibernation mode, so installer does not see it correctly.
Make sure you delete correct partition. Both installs probably used same swap.
Grub probably also includes old install. Second install should be the one in grub, so you do not have to update grub in MBR first. But it does not hurt to boot into install you want to keep and run this:
From inside your working install to have its grub boot loader in MBR of sda.
sudo grub-install /dev/sda
After deleting older install. Boot back into working install and run this to remove old installs grub entry.
sudo update-grub
Re: newbie's errors reinstalling 14.04, dual boot with XP
Thanks so much, oldfred!
Does it make sense to delete all entries in old install (usr....var) before proceeding? I'd do it via GUI.
I'm not sure that the live cd gave the option of deleting a partition ... but I'll have a look. I had installed GParted via Software Center, and ... GParted made it look suspiciously easy to do...
(Fortunately, as I said ... I can afford to mess up. Everything is backed up.)
I'm going to read up on partitions ...but does deleting the Install #1 'partition wall' adjacent to new install automatically create the larger partition I'd wanted? Or are there no 'walls?' I guess I'm saying: how do I conceptualize a 'partition'? (I shouldn't be asking you to do my homework...)
Yeah, I'm kind of clueless. Thanks so much for your help.
4 Attachment(s)
Re: newbie's errors reinstalling 14.04, dual boot with XP
I think the only auto partitioning change is the older auto install side by side. But any auto change has always scared me, so I use gparted in advance for all my installs and then use Something Else to choose partition mount and format. And I have managed to screw that up, by making several partitions, small for root and large for data and then forgetting which is which and installing to the large partition. :)
Deleting a partition does not auto adjust other partitions. You have to manually move them around. And if one is primary and the other logical you may also have to resize the extended partition first. It become the old slide puzzle game. With gparted also do not queue events, but process each change, so you know that it completes before starting anther.
GParted partitioning software - Full tutorial
http://www.dedoimedo.com/computers/gparted.html
Screenshots of using gparted
http://www.howtoforge.com/partitioning_with_gparted
Re: newbie's errors reinstalling 14.04, dual boot with XP
So far in the Linuxsphere, I've never made a mistake so big I couldn't recover from it ... but I think I've now blown it.
Using the Mini-Tool (Partition Wizard) on the installer cd, I went ahead and deleted what I ... am certain was the correct partition (before seeing oldfred's reply ... though I'm such an idiot, I don't think it would have helped me). But - clearly, I didn't do enough homework, and Grub Rescue is my reward. Can't boot. Now the 28GB apportioned to the original install is 'unallocated' (and, according to the ubuntu installer, 'unusable')
The only good thing is that - my data's all backed up.
I began to resize the partition on the 23GB allocated to the second install - I'd want to merge it with the 28GB of unallocated space - but I know I don't know what I'm doing. How to rescue myself?
Thanks for your patience...!
Re: newbie's errors reinstalling 14.04, dual boot with XP
small update - repaired MBR so I could boot into XP, made a series of other mistakes using the Partition Wizard Mini-Tool (I wish my install CD had come with GParted ...not that great software can stop me from making a mess) again unable to boot into either XP or Ubuntu. Back to the installer disc.
Extended NTFS partition to cover the unallocated space...booted with installer disc, and installed Boot Repair to boot back into Trusty.
Whew! I hate learning the hard way, but it seems to be the only way I learn.
Now I'm unable to boot into XP (and also would want to shrink the XP partition with GParted, once I have it).
My question now: how to boot into XP without messing up boot into Ubuntu?
Re: newbie's errors reinstalling 14.04, dual boot with XP
Any resize of a Windows NTFS partition required a chkdsk before it will boot again. You only can run chkdsk from a Windows repair CD or the XP installer.
Best to use Windows tools on Windows but only Linux tools with Linux.
Gparted is on the Ubuntu installer. Not sure about other flavors you easy to install if booted in live mode as it is in repository. Also you can download a gparted liveCD or Parted Magic liveCD.
Post link from Boot-Repair's BootInfo report.
Boot Repair -Also handles LVM, GPT, separate /boot and UEFI dual boot.:
https://help.ubuntu.com/community/Boot-Repair
Re: newbie's errors reinstalling 14.04, dual boot with XP
Thanks so much, oldfred. The current status is: (not knowing I had to use chkdsk) I used Gparted to resize XP and Ubuntu partitions to where I want them; I can now boot into Ubuntu fine, but still can't boot into XP (no surprise). I did run bootinfo, and have a RESULTS.txt - is it ok to post this super-long thing? (I'm in the process of burning Boot-Repair iso to disc and running this.)
Thanks for your ... patience. (!)
Re: newbie's errors reinstalling 14.04, dual boot with XP
Quote:
Originally Posted by
andrea b
I did run bootinfo, and have a RESULTS.txt - is it ok to post this super-long thing? (I'm in the process of burning Boot-Repair iso to disc and running this.)
yes it is allowed just wrap it in code tags (the # icon)
by the way - you are needlesly complicating a very simple install.
Re: newbie's errors reinstalling 14.04, dual boot with XP
I only overcomplicate things the first time. And - I really appreciate your help. Here is the RESULTS.txt.
Code:
Boot Info Script 0.61 [1 April 2012]
============================= Boot Info Summary: ===============================
=> Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
in partition 112 for .
sda1: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows XP: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows XP
Boot files: /boot.ini /NTLDR /NTDETECT.COM
sda2: __________________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 14.04 LTS
Boot files: /boot/grub/grub.cfg /etc/fstab
sda3: __________________________________________________________________________
File system: Extended Partition
Boot sector type: -
Boot sector info:
sda5: __________________________________________________________________________
File system: swap
Boot sector type: -
Boot sector info:
sda4: __________________________________________________________________________
File system: vfat
Boot sector type: Windows XP: FAT32
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /boot.ini /ntldr /NTDETECT.COM /COMMAND.COM
============================ Drive/Partition Info: =============================
Drive: sda _____________________________________________________________________
Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Partition Boot Start Sector End Sector # of Sectors Id System
/dev/sda1 6,144 112,859,135 112,852,992 7 NTFS / exFAT / HPFS
/dev/sda2 * 112,859,136 220,780,543 107,921,408 83 Linux
/dev/sda3 220,782,529 224,954,367 4,171,839 f W95 Extended (LBA)
/dev/sda5 220,782,592 224,954,367 4,171,776 82 Linux swap / Solaris
/dev/sda4 224,955,360 234,435,599 9,480,240 2 XENIX root
"blkid" output: ________________________________________________________________
Device UUID TYPE LABEL
/dev/sda1 01CF66B029E22F00 ntfs Preload
/dev/sda2 840d7d90-0601-49a8-b8ae-d120c83544e9 ext4
/dev/sda4 70EF-93F2 vfat SERVICEV001
/dev/sda5 d04845a7-2b56-4a7f-bf85-21b2a10a5620 swap
/dev/sr0 iso9660 CDROM
================================ Mount points: =================================
Device Mount_Point Type Options
/dev/sda2 / ext4 (rw,errors=remount-ro)
/dev/sr0 /media/andrea/CDROM iso9660 (ro,nosuid,nodev,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500,uhelper=udisks2)
================================ sda1/boot.ini: ================================
--------------------------------------------------------------------------------
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect
--------------------------------------------------------------------------------
=========================== sda2/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
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
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 {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 840d7d90-0601-49a8-b8ae-d120c83544e9
else
search --no-floppy --fs-uuid --set=root 840d7d90-0601-49a8-b8ae-d120c83544e9
fi
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
set timeout=10
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=10
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=10
fi
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 ###
function gfxmode {
set gfxpayload="${1}"
if [ "${1}" = "keep" ]; then
set vt_handoff=vt.handoff=7
else
set vt_handoff=
fi
}
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
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-840d7d90-0601-49a8-b8ae-d120c83544e9' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 840d7d90-0601-49a8-b8ae-d120c83544e9
else
search --no-floppy --fs-uuid --set=root 840d7d90-0601-49a8-b8ae-d120c83544e9
fi
linux /boot/vmlinuz-3.13.0-24-generic root=UUID=840d7d90-0601-49a8-b8ae-d120c83544e9 ro quiet splash $vt_handoff
initrd /boot/initrd.img-3.13.0-24-generic
}
submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-840d7d90-0601-49a8-b8ae-d120c83544e9' {
menuentry 'Ubuntu, with Linux 3.13.0-24-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-24-generic-advanced-840d7d90-0601-49a8-b8ae-d120c83544e9' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 840d7d90-0601-49a8-b8ae-d120c83544e9
else
search --no-floppy --fs-uuid --set=root 840d7d90-0601-49a8-b8ae-d120c83544e9
fi
echo 'Loading Linux 3.13.0-24-generic ...'
linux /boot/vmlinuz-3.13.0-24-generic root=UUID=840d7d90-0601-49a8-b8ae-d120c83544e9 ro quiet splash $vt_handoff
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.13.0-24-generic
}
menuentry 'Ubuntu, with Linux 3.13.0-24-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-24-generic-recovery-840d7d90-0601-49a8-b8ae-d120c83544e9' {
recordfail
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 840d7d90-0601-49a8-b8ae-d120c83544e9
else
search --no-floppy --fs-uuid --set=root 840d7d90-0601-49a8-b8ae-d120c83544e9
fi
echo 'Loading Linux 3.13.0-24-generic ...'
linux /boot/vmlinuz-3.13.0-24-generic root=UUID=840d7d90-0601-49a8-b8ae-d120c83544e9 ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.13.0-24-generic
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry 'Memory test (memtest86+)' {
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 840d7d90-0601-49a8-b8ae-d120c83544e9
else
search --no-floppy --fs-uuid --set=root 840d7d90-0601-49a8-b8ae-d120c83544e9
fi
knetbsd /boot/memtest86+.elf
}
menuentry 'Memory test (memtest86+, serial console 115200)' {
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 840d7d90-0601-49a8-b8ae-d120c83544e9
else
search --no-floppy --fs-uuid --set=root 840d7d90-0601-49a8-b8ae-d120c83544e9
fi
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Microsoft Windows XP Professional (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-01CF66B029E22F00' {
insmod part_msdos
insmod ntfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 01CF66B029E22F00
else
search --no-floppy --fs-uuid --set=root 01CF66B029E22F00
fi
parttool ${root} hidden-
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry 'Windows NT/2000/XP (on /dev/sda4)' --class windows --class os $menuentry_id_option 'osprober-chain-70EF-93F2' {
insmod part_msdos
insmod fat
set root='hd0,msdos4'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos4 --hint-efi=hd0,msdos4 --hint-baremetal=ahci0,msdos4 70EF-93F2
else
search --no-floppy --fs-uuid --set=root 70EF-93F2
fi
parttool ${root} hidden-
drivemap -s (hd0) ${root}
chainloader +1
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
set timeout=10
fi
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###
### 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 ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------
=============================== sda2/etc/fstab: ================================
--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid' 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>
# / was on /dev/sda7 during installation
UUID=840d7d90-0601-49a8-b8ae-d120c83544e9 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda6 during installation
UUID=d04845a7-2b56-4a7f-bf85-21b2a10a5620 none swap sw 0 0
--------------------------------------------------------------------------------
=================== sda2: Location of files loaded by Grub: ====================
GiB - GB File Fragment(s)
================================ sda4/boot.ini: ================================
--------------------------------------------------------------------------------
[boot loader]
timeout=0
default=C:\
[operating systems]
multi(0)disk(0)rdisk(0)partition(4)\WINDOWS="Microsoft Windows XP Professional" /fastdetect
C:\ = "PC-DOS"
--------------------------------------------------------------------------------
=============================== StdErr Messages: ===============================
cat: /tmp/BootInfo-OdkCPVzW/Tmp_Log: No such file or directory
Thanks so much.