PDA

View Full Version : [wubi] can I install multiple ubuntu versions on same machine via Wubi?



agrayray
October 10th, 2010, 03:16 AM
I already have xubuntu installed on my computer via wubi that is installed to c:\ubuntu. Is there a way I can install the gnome version also via wubi and have both options to choose from at boot?

It looks like that the installer only allows one installation (it says you must remove the previous version) and the location c:\ubuntu is set and can not be changed. Ideally I would like to install various versions via wubi to locations other than \ubuntu...I only have one partion and volume (C) that I can not change (its a work computer).

Thanks!

Rei

kroq-gar78
October 10th, 2010, 04:44 AM
do you really want 2 separate operating systems or just the desktop environments? If you just want the desktop environments, then in command line in Xubuntu type in ( i think, nothing bad will happen if pkg name is incorrect):

sudo apt-get install gnome-desktop
and then just select which desktop environment to use at login screen.

I'm not sure whether you can really install 2 wubi installations on one system, though.

agrayray
October 10th, 2010, 05:14 AM
Thanks Krog for the reply.

I actually really want two separate operating systems; although you bring up a good point because at this point I'm really just trying to test compatibility of different software on each desktop.

I'll give it a try but would prefer to have two separate environments to test; if there is a way...?

bcbc
October 10th, 2010, 05:34 AM
There isn't any way to do this - through normal means.
But it you copy your root.disk to another directory, then reinstall wubi, you can boot the old one by adding a new menuentry to grub.cfg on the new install (e.g. in custom_40).

e.g.
menuentry "other wubi" {
set ....
loopback loop0 /otherubuntu/disks/root.disk
set root=(loop0)
etc....
linux /.... .... loop=/otherubuntu/disks/root.disk ....
.....

agrayray
October 10th, 2010, 10:21 AM
Thanks bcbc!!! That did the trick.

Pretty easy to just modify the path for my menu entries, although I get an error the first time trying to run 'other wubi' from the grub menu. Is that normal?

Basically I did the following:



copied my xubuntu that was in c:\ubuntu to c:\xubuntu
uninstalled ubuntu via the add/remove programs in windows control panel
installed gnome version from wubi on cd
edited my /boot/grub/grub.cfg file via the cmd sudo gedit /boot/grub/grub.cfg
copied my entries from my xubuntu grub.cfg into the 40_custom section of my gnome installation.

The first time I select my Xubuntu entry I get the following error:


error: out of disk.
error: you need to load the kernel first

press any key to continue...After I press a key to continue and select the Xubuntu entry a second time its loads ok, although I do notice some strange green flashes and some 'random' errors fly by now in the boot process and also it takes a few seconds for the mouse to work at the login screen. These behaviors happen in both versions and weren't there before, but beyond that it works.


Here's my grub.cfg if it helps (perhaps for someone else in the future)


#
# 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
}
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
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/10_lupin ###
menuentry "Ubuntu, Linux 2.6.32-21-generic" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 60d29c09d29be218
loopback loop0 /ubuntu/disks/root.disk
set root=(loop0)
linux /boot/vmlinuz-2.6.32-21-generic root=/dev/sda1 loop=/ubuntu/disks/root.disk ro quiet splash
initrd /boot/initrd.img-2.6.32-21-generic
}
menuentry "Ubuntu, Linux 2.6.32-21-generic (recovery mode)" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 60d29c09d29be218
loopback loop0 /ubuntu/disks/root.disk
set root=(loop0)
linux /boot/vmlinuz-2.6.32-21-generic root=/dev/sda1 loop=/ubuntu/disks/root.disk ro single
initrd /boot/initrd.img-2.6.32-21-generic
}
### END /etc/grub.d/10_lupin ###

### BEGIN /etc/grub.d/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows NT/2000/XP (on /dev/sda1)" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 60d29c09d29be218
drivemap -s (hd0) ${root}
chainloader +1
}
### 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.

## MOD:: for Xubuntu menu entries ##
menuentry "Xubuntu, Linux 2.6.32-25-generic" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 60d29c09d29be218
loopback loop0 /xubuntu/disks/root.disk
set root=(loop0)
linux /boot/vmlinuz-2.6.32-25-generic root=/dev/sda1 loop=/xubuntu/disks/root.disk ro quiet splash
initrd /boot/initrd.img-2.6.32-25-generic
}
menuentry "Xubuntu, Linux 2.6.32-25-generic (recovery mode)" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 60d29c09d29be218
loopback loop0 /xubuntu/disks/root.disk
set root=(loop0)
linux /boot/vmlinuz-2.6.32-25-generic root=/dev/sda1 loop=/xubuntu/disks/root.disk ro single
initrd /boot/initrd.img-2.6.32-25-generic
}
### END /etc/grub.d/40_custom ###

bcbc
October 10th, 2010, 04:34 PM
You want to edit the file /etc/grub.d/40_custom (backup and chmod -x the backup first). Then run "sudo update-grub" to get it in the grub.cfg (don't edit directly if you can avoid).

if you use /vmlinuz and /initrd.img instead of /boot/vmlinuz-xxxxx then you don't have to update the entry every time you install a new the kernel version.

Also change the fstab on the copied one.

# /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
/host/xubuntu/disks/root.disk / ext4 loop,errors=remount-ro 0 1
/host/ubuntu/disks/swap.disk none swap loop,sw 0 0


Also use gksu (gksudo) instead of sudo to run gedit.

bcbc
October 10th, 2010, 04:46 PM
You should be able to pull the whole xubuntu grub.cfg menu from the new ubuntu like this:



$ cat 40_custom
#!/bin/sh
exec tail -n +3 $0
# 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.
menuentry "Xubuntu"{
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 60d29c09d29be218
loopback loop0 /xubuntu/disks/root.disk
set root=(loop0)
configfile /boot/grub/grub.cfg
}

Something like that...

agrayray
October 16th, 2010, 06:35 AM
Thanks bcbc!!!

Sorry for the delay in responding was away on travel..but back now and works!!! Thanks again for the extra admin type assistance!

bcbc
October 16th, 2010, 07:32 AM
Thanks bcbc!!!

Sorry for the delay in responding was away on travel..but back now and works!!! Thanks again for the extra admin type assistance!
Cool! You're welcome :)