Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Author Topic: just trying Ubuntu  (Read 4042 times)

jeffbb

  • Kitizen
  • ****
  • Posts: 2329
just trying Ubuntu
« on: September 05, 2011, 06:37:23 PM »

Hi
Running from disk ! on spare laptop .Haven't yet installed it.Started to but some messages I was not sure what they really meant. I was quite happy installing along side  win7,but then on the disk partition it said if I carried on it could not be reversed ? Does that mean I could not uninstall Ubuntu and revert to Win7 ?
regards Jeff
Logged
zen user

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43467
  • Penguins CAN fly
    • DSLstats
Re: just trying Ubuntu
« Reply #1 on: September 05, 2011, 06:42:54 PM »

I presume that you took the option to install Ubuntu on a separate partition, and not in the same partition as Windows? If so, all that warning means is that the Ubuntu partition will be formatted prior to installation, so any information you might have had on that partition will be lost for ever. It will set up your system with a boot menu so you can choose to boot Windows or Ubuntu.

Good luck, and have fun. :)
Logged
  Eric

exo

  • Kitizen
  • ****
  • Posts: 2927
Re: just trying Ubuntu
« Reply #2 on: September 05, 2011, 10:17:38 PM »

Sometimes, Linux may corrupt the Windows MBR (master boot record), especially if and when you remove Linux.
This may help if that situation arises.
http://windows7themes.net/how-to-fix-mbr-in-windows-7.html

exo
Logged

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43467
  • Penguins CAN fly
    • DSLstats
Re: just trying Ubuntu
« Reply #3 on: September 05, 2011, 10:37:41 PM »

A normal Linux installation won't corrupt the MBR, it will replace it to point to its own bootloader which allows you to boot different operating systems. If you subsequently want to uninstall Linux and just leave Windows, then that link tells you how to revert to the Windows MBR which will only boot Windows.
Logged
  Eric

exo

  • Kitizen
  • ****
  • Posts: 2927
Re: just trying Ubuntu
« Reply #4 on: September 06, 2011, 02:35:24 PM »

Once a user Installs Linux, GRUB replaces the MBR entry for Windows, However GRUB keeps Windows bootable.
But as soon as user deletes the Linux partition, or Re-formats it. Windows becomes un-bootable.

I call that a corrupt Windows MBR.

The best option will be to install a 3rd party boot manager to Windows 7 from the outset.
http://neosmart.net/blog/2011/easybcd-2-1-and-some-big-changes/

exo
Logged

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43467
  • Penguins CAN fly
    • DSLstats
Re: just trying Ubuntu
« Reply #5 on: September 06, 2011, 02:51:15 PM »

Yes, fair enough. If you're starting from a position of having Windows installed, then the third party boot manager is a failsafe option. If you follow this route, when installing Linux you have to make sure that you don't write the Linux bootloader to the MBR of course - most Linux installers will give you the option of writing it to the partition you're installing Linux into, or not to write it at all. Writing it to the installation partition is the better option, because it does no harm there, and offers other bootloader options if you want to change things in the future.

Logged
  Eric

jeffbb

  • Kitizen
  • ****
  • Posts: 2329
Re: just trying Ubuntu
« Reply #6 on: September 06, 2011, 06:53:33 PM »

Hi
Well its installed and both windows and Ubuntu are working  :)
I did a disk copy of windows before starting .Would that not suffice if I decided to take off Ubuntu and I did have some windows problems ?

I am using it now !I am having some problems with some downloads  will open another post.
Regards Jeff
Logged
zen user

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43467
  • Penguins CAN fly
    • DSLstats
Re: just trying Ubuntu
« Reply #7 on: September 06, 2011, 07:02:24 PM »

I did a disk copy of windows before starting .Would that not suffice if I decided to take off Ubuntu and I did have some windows problems ?

I think that would only have saved the contents of the Windows partition, not the MBR. But if necessary you should be able to repair the MBR using the method indicated above by exo.
Logged
  Eric

Mick

  • Reg Member
  • ***
  • Posts: 292
Re: just trying Ubuntu
« Reply #8 on: January 08, 2012, 08:52:17 PM »

Coming late at this, but just in case it helps in the future.  The MBR is not corrupted when you overwrite it with the GRUB bootloader code, any more than overwriting it with the MSWindows bootloader code.  Corruption implies damaged data.  The GRUB MBR is not damaged at all in this case, but the Linux /boot partition would have been.

As has been already explained if the Linux partition (or boot partition if it is a multi-partition installation) is deleted GRUB will not be able to start up any OS, including MSWindows.  This is because all the necessary fs drivers are in the linux /boot directory which was wiped out.

The solution is to run fixmbr from a MSWindows installation/recovery CD (http://www.nu2.nu/pebuilder/ or similar should do the trick).

Alternatively, there are two immediate options that I can think of in the Linux world:

1. Create a back of your MBR.

It is prudent to plan in advance and create a back of your MSWindows MBR sector using a Linux LiveCD (sysrescuecd knoppix, etc). 
Run this:
Code: [Select]
mount /dev/sdb1 /media/sdb1  <--mount a USB stick, or
mkdir /mnt/windows
mount -t ntfs-3g /dev/sda3 /mnt/windows <--mount your MSWindows partition
dd if=/dev/sda of=/mnt/windows/mbr_backup bs=512 count=1
umount -t ntfs-3g /dev/sda3

The above assumes that the main MSWindows OS is on /dev/sda3.  Various OEMs have additional recovery and boot partitions these days.  If you are not sure use gparted, to see what the labels of the partitions say and anyway you'll need to shrink the MSWindows partition before you install Linux.

When you remove your Linux OS, all you need to do is use a LiveCD and run dd in reverse:
Code: [Select]
mkdir /mnt/windows
mount -t ntfs-3g /dev/sda3 /mnt/windows <--mount your MSWindows partition
dd if=/mnt/windows/mbr_backup of=/dev/sda bs=512 count=1
umount -t ntfs-3g /dev/sda3

2. Instead of using GRUB to chainload the MSWindows OS, you can install the GRUB bootloading code in the Linux partition boot record and chainload the Linux OS from the MSWindows boot manager.  The process is more convoluted because you will need to edit the MSWindows boot menu to point it to the Linux boot sector.  I'll only give the highlights here, Google should help with the rest:

Install Linux and make sure that you ask the installation manager/script to install GRUB to the Linux partition *not* the disk.  Then use dd (as I showed above) to make a back up of the Linux partition boot record and save it to your MSWindows partition.  Then edit your MSWindows boot menu (MS Vista and Windows 7 have a different boot menu file than previous MSWindows OS' so you'll need to read up on this) and point it to the back up of the Linux boot record.  That's all.

However, the catch with this is that if you ever reinstall Linux or install a new version of GRUB, then you'll need to repeat the above process or Linux will not boot with the old back up of the boot record.  With a distro like Ubuntu which keeps updating the MBR this is a relatively regular process (say 3 - 5 times a year).

I'd recommend option 1.  ;)
Logged
Regards,
Mick