[SOLVED] Dual boot Windows 7 and Ubuntu on USB

I am trying to dual boot on an external USB 500GB drive using my laptop.I have Windows 7 installed and booting on 1st partition 230GB now as active primary, 2nd partition is 100GB as primary, and 3rd partition is 135GB as primary. I was intending on installing Ubuntu onto the 2nd partition. I read the article "How to dual boot Windows XP and Linux (XP installed first) -- the step-by-step guide with screenshots". It seems to say that Ubuntu will install alongside Windows in the same partition. Is this true? Can it be installed into it's own partition and dual boot along with windows? Thanks.

No, Linux cannot install into the same partition as Windows. It may be able to shrink the size of the windows partition so it can make a new one.

OK, so it probably would take the 2nd partition in my case?

Well, Windows often hogs several partitions these days. It could be third or fourth.

Well in my case Windows 7 is on the 1st active partition. So I'd hope that Ubuntu would take the second. I should make an image backup of this external drive with Paragon backup before proceeding since I've got a few hours spent setting it up so far.

Notice that Linux usually uses not one but several partitions (=filesystems). Installing all in one partition is possible but in the long run not a very good idea, IMHO.

The partition layout i found most satisfying over time is like the following, but i have to admit i don't have any Windoze-partitions on any of my systems.

/boot    128MB
/        10G
/home    5G
swap     =RAM

I usually put the "/home", "/" and "swap" in a LVM volume group leaving the remainder of the disk free, so that i can add space to any filesystem which might need it later.

"/" only contains system files and usually 10G is sufficient. Most of my installations take initially about 2GB, which will grow later as updates run in, but 10G should work for some time.

"/boot" only holds the kernel image and some GRUB-configuration files. 128M will be all you ever need. Habitually i put this partition at the beginning of my disks, because many years ago Linux was not able to boot from a disk cylinder >=1024. These times are long gone, but habits die hard. It needs to be on a separate partition because Linux cannot boot from an LVM partition.

"swap" equal the size of your RAM is a good starting point. If the usage pattern of your system is not completely far out of the normal average it will be OK. Once your system starts paging heavily on a regular basis you should consider upgrading your RAM anyway.

How much you need in "/home" depends on you. You will probably have to fine-tune this. If you use an LVM you can dynamically make the FS bigger. I have usually several Linux/Unix-distributions on my laptop, so i share the LVM partitions and make sure every distro uses the same UID for my user. This way i can share my HOME directory in different distributions.

When installing several distributions in a multi-boot system i give every distribution its own "/" filesystem, but they share the swap and the "/home". They all start from the same "/boot".

I hope this helps.

bakunin

1 Like

Windows tends to have several partitions these days. It doesn't show you them all. So Linux may end up the third, or fourth. If you make one of them an extended partition, you can subdivide it as you please.

1 Like

I think I get it now. I can just delete the 3rd 135GB partition (which I don't really need anyway) using windows disk manager. Then when I install Ubuntu it will probably pick that now empty partition, and I can partition it during the Ubuntu install as you suggest above.

Yes, that should work.

I'm not sure how easy it will be to boot Windows after. The bootloader might pick it up automatically, or might need it edited in.

It worked! I was able to boot the Ubuntu DVD and the custom partition section of the install I was able to partition the WD elements USB drive. I tried to follow the preceding suggestion here I have root 15GB and boot 1GB setup.

But when I got to select a swap I didn't see the option. I only see: /, /boot, /home, /tmp, /usr, /var, /srv, /opt, /usr/local ! So which one is swap? I exited out discontinuing the install.

Thanks!

Swap has no folder, so that is normal.

So I did / (root) and /boot so far. I would just need to setup /home. But bakukin said "swap= RAM". Where do I specify this amount? In my case 12GB ram.

Edit: I just found out that "Swap area" is in a pulldown beside "Use as" from the article "Dual-boot Ubuntu 12.04 and Windows 7 on a computer with 2 hard drives"

I got it all done. From article "Dual-boot Ubuntu 12.04 and Windows 7 on a computer with 2 hard drives" I found that swap is a pull down option. So I went thru the whole Ubuntu 12.10 install perfect. Rebooted to the F12 options selected USB and it came up with Ubuntu boot menu. Ubuntu is 1st choice and Windows is last, (since I installed Win 7 first.) Ubuntu boots ok and Windows boots ok! Wala!

1 Like