Target was: | have the best of both worlds (WINDOWS and LINUX :-) | |
Subject was: | Inspiron 15 laptop with an Intel I5 64-bit processor, 8 GB RAM and 1 TB disk | |
Operating systems involved: | WINDOWS 8.1, LINUX Ubuntu 14.04.1 | |
Hardware information received from retailer: | none | |
Internet information about the laptop's LINUX compatibility: | none | |
Strategy: | (1) read, (2) think, (3) decide, (4) click :-) | |
Needed for: | preserving WINDOWS during a LINUX installation |
Requisites
- 2 USB sticks (one at least 1 GB, one at least 512 MB), formatted preferably by WINDOWS, as rescue devices for both operating systems
- internet connection
- a downloaded ISO image of the latest Ubuntu 14.04 amd64 ISO image, available on releases.ubuntu.com (best use BitTorrent to download it)
- UNetbootin for writing the LINUX ISO image to an USB stick
- lots of time to read, think, decide and click :-)
Here is a very helpful link to Ubuntu-Help.
Fast Success
Here is a way to get LINUX installed on hard-disk without having to repair WINDOWS.
Mind that this is not guaranteed to also work on your computer!
What did I do? I ...
- logged into WINDOWS
- went to "Computer Management" - "Disks" in system control panel and tried to shrink the big WINDOWS partition, it let me take away 470 of 980 GB
- used UNetbootin
to download the LINUX Ubuntu 14.04.1 amd64 "Live" ISO image (to drive LINUX without installing it)
and wrote it to the prepared USB stick (the image requires 1 GB).
Warning: after the grub LINUX boot loader had been installed successfully, I had problems to use UNetbootin one more time to install another LINUX. After running it and rebooting, Windows reported an unsafe state and requested a repair disk. It was not possible to get to the UNetbootin boot menu. So I gave up installing from WINDOWS filesystem and used an USB stick after. - created a WINDOWS repair utility on another USB stick with at least 512 MB for the case that things might go wrong
- inserted the LINUX USB stick, because boot order can be set to prefer the stick only when it was inserted before switching on the computer, else the BIOS won't see the stick
- rebooted
- pressed F2 on computer startup to get into UEFI (Unified Extensible Firmware Interface) setup, this is now what once was called BIOS
- did NOT use the Legacy Mode here, and thus hopefully avoided grub surprises
- disabled "Fast Boot", else the stick wasn't detected
- "Secure Boot" was enabled (this is default)
- changed the boot order to first check for USB (which was listed by its product label), did not do anything else on any other page of the UEFI setup
- pressed F-10 to save and reboot (they call it "reset", quite misleading)
- Ubuntu showed its boot menu, selected default (run it)
- clicked on "Install Ubuntu" icon on Ubuntu desktop
- after choosing language and more the partitioning showed up, I chose doing "Something else" than erase all existing operating systems :-)
- created a swap partition of 16 GB (twice the memory), as primary partition, because this was a GPT disk management (see below) and thus I can have up to 128 primary partitions
- created a "/" root partition of 25 GB with an ext4 LINUX file system, also of type primary
- clicked on "Install", and off it went without safety questions
- clicked OK to reboot with removed USB stick
And there it was, a nice grub 2 boot menu let me drive both WINDOWS and LINUX (to be sure I tested both :-)
Because you install from a fully-featured "Live" LINUX you can even search the internet for answers when problems occur during installation. This makes it really easy. The only bottleneck is the work to be done in UEFI / BIOS (no internet available).
Worthwhile to know
How to boot from USB?
Be sure that the USB stick is inserted BEFORE switching on the computer!
For this DELL laptop, F2 is to get to the UEFI setup screen (BIOS), and F12 calls an UEFI boot menu, both available during laptop hardware startup. I needed a lot of time to find out the correct UEFI / BIOS configuration for booting from USB. I had switched to "Legacy Mode", because in default UEFI mode the USB was not listed, but this was a mistake. I had set up the boot device order, but the computer ignored the USB stick and and even the hard-disk (Windows Bootmanager) and went into a network boot device search. The USB was listed here as "hard drive", selecting it brought the UNetbootin menu. After I had switched back to UEFI, the USB finally was listed with its product label (still not as USB). And now it respected the boot order I defined. The problem was that I thought I can define USB as first boot device without having the stick inserted!
MBR or GPT?
How to know whether a disk is managed by
MBR (Master Boot Record) or
GPT (GUUID partition table)?
With a GPT you can have up to 128 primary partitions, with MBR only 4. Plays a role when
creating partitions on LINUX install.
Launch cmd.exe (WINDOWS) and enter
This is a MBR managed disk. If it was of type GPT, this would have looked likeC:\> diskpart DISKPART> LIST DISK Disk ### Status Size Free Dyn Gpt -------- ------- -------- ------- --- --- Disk 0 Online 75 GB 0 B DISKPART> exit
Disk ### Status Size Free Dyn Gpt -------- ------- -------- ------- --- --- Disk 0 Online 75 GB 0 B *
MFT at end of partition?
Shrinking the WINDOWS partition is said to be kind of impossible when the invisible MFT (Master File Table) has been put to the end of the partition, so that you can not shrink it. You will know about that when you try to shrink the partition in WINDOWS Computer Management disk utility. If it offers zero bytes, you will need a lot of magic.
Is "amd64" for AMD processors only?
The acronym "amd64" means 64 bit, it is not a restriction to AMD processors. It is just a naming convenience because AMD first built such processors. You can apply any amd64 LINUX ISO image also to an Intel PC when it is 64-bit.
No more WINDOWS rescue DVD
I prepared an empty read/writeable DVD which turned out to be dispensable, because WINDOWS 8.1 does not support rescue DVD anymore, only USB stick! It wants 16 GB for a full image backup, and for a small rescue device it wants 512 MB.
Can not write to DVD
When you insert a read-write DVD into an Windows operating system, it will ask you to format the medium. When you click "Yes", you got a file system on your DVD. When you then boot LINUX and want to "burn" an ISO image to that DVD, the burning utility (e.g. Brasero) will tell you that the disk is full. It looks like you can not burn data to a DVD after Windows formatted it. But this is wrong (at least for LINUX). What you need to do is un-mount the DVD. Sounds absurd, but it works. Most LINUX automatically mount a DVD when they detect its insertion. Find out the DVD's mount point and its device. Open a terminal and type (the $ is the terminal's prompt symbol)
$ df Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda8 24476036 5009848 18199808 22% / none 4 0 4 0% /sys/fs/cgroup udev 4028680 4 4028676 1% /dev tmpfs 807896 1196 806700 1% /run none 5120 0 5120 0% /run/lock none 4039472 80 4039392 1% /run/shm none 102400 52 102348 1% /run/user /dev/sda5 484461564 49290276 435171288 11% /media/windisk /dev/sda1 507904 55720 452184 11% /boot/efi /dev/sdb1 7812864 9600 7803264 1% /media/fridell/20A6-2E72 /dev/sr0 4589632 4589632 0 100% /media/fridell/UDF Volume
Here the DVD device is /dev/sr0
and its mount point is /media/fridell/UDF Volume
.
( /dev/sdb1
is an USB stick.)
Now launch
umount "/media/fridell/UDF Volume"
Please notice the "quotes" to mask the space in the directory name! Restart the DVD burning software, it should offer "burning" to the DVD now.
USB sticks containing ISO images
Mind that once after having written an ISO image to an USB stick, you can not repeat this process with UNetbootin before having formatted the USB stick again. UNetbootin will not report an error, but it won't write anything to the stick in that case!
Gparted cylinder aligning
Heard about gparted (a nice LINUX partition editor) and the obligation to uncheck its 'round to cylinders' checkbox when working on WINDOWS partitions, see Ubuntu-Help.
Installer complains about missing "Reserved BIOS boot area"
After partitioning a dialog comes up saying
The partition table in use on your disk normally requires you to create a separate partition for boot loader code. ...
This seems to be due to having booted in BIOS "Legacy Mode". Read this.
Windows disk not accessible from LINUX
When you shut down Windows, it hibernates itself by default, except when you explicitly choose the "Shut down" menu item.
When you then boot LINUX, and you have a mount-line in /etc/fstab
for the Windows-disk,
you might be prompted to skip this mount, or do it read-only, this happens while booting.
This prompt looks like the OS can not start up. It can be avoided by turning off the Windows "Fast Startup" option:
- log into Windows as administrator
- open the Control Panel and click "Power Options" (energy settings)
- click the "Choose what the power buttons do" link on the left side
- although you are administrator you must click the "Change settings that are currently unavailable" link now
- all checkboxes should be enabled, you can disable "Turn on fast startup" checkbox in the lower part of the UI
- do not forget to save the settings
regedit.exe
(Windows Registry editor) under
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power
.
Beautiful boot
Start an editor as superuser (sudo gedit
) and load /etc/defaults/grub
.
Comment out / in following lines:
# GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_TERMINAL=console
Save, and then launch sudo update-grub
in a terminal.
Now you will have a nice centered console boot menu without graphics,
and you will see LINUX outputs during startup and shutdown :-)
Start without login (unsafe!)
If you want to avoid the login screen to require your password, you can do this in both operating systems. Do this only when your computer is safe against any threats. In LINUX you can do this in
"System Settings" -> "User Accounts", check the box for "Auto login".
You will have to enter the superuser password to be able to change that setting.
In WINDOWS you must use a cmd.exe
terminal and input
netplwiz
There you have a checkbox to deactivate the login screen. You will have to enter your password when switching it off.
Restore boot loader after installing another LINUX
After I had installed a second LINUX (Debian), the boot loader of the new LINUX had taken over the boot menu. It contained all necessary entries to boot the two other operating systems, but I wanted to use Ubuntu's grub.
In the computer's UEFI setup all three operating systems were visible as bootable devices: "ubuntu", "debian", "Windows boot manager". So I could simply set the boot order to prefer Ubuntu, which caused the Ubuntu boot menu to show up again.
But this did not contain the new Debian. To refresh it, all I had to do (in Ubuntu) was
sudo update-grub
After that the new Debian LINUX was in the boot menu of the Ubuntu boot loader. Mind that Debian 7.8.0 can not start up in UEFI's SECURE BOOT mode, but Ubuntu 14.04 can.
After having installed a third LINUX (Mint), there was no new bootable device visible in UEFI setup. Mint had taken over the "ubuntu" UEFI entry (Mint is an Ubuntu). Any LINUX boot menu can be restored using
sudo update-grub # reconfigures boot menu, searching for new bootable partitions sudo grub-install # copies boot loader files to boot partition
This is what I did to reactivate Ubuntu's boot menu, working from Ubuntu.
The internet recommends to prepare a separate boot loader partition in case there are more than one LINUX present on a machine. But I did not find a manual about how to install such using grub 2 (only for grub 1). Why would I need this: when having a lot of different operating systems on a machine, you might forget which one contains the boot menu.
Editing grub boot menu
What's in the the grub 2 boot menu is in /boot/grub/grub.cfg
(no more in menu.lst
like it was with grub 1).
But this is some kind of script now, and thus far more complicated to edit
than menu.lst
was. Be very careful!
You need no update-grub
after.
Be aware that your changes will disappear on next update-grub
call,
because /boot/grub/grub.cfg
is a generated file.
Alternatively you can
try to understand
what is going on in /etc/grub.d/
, there is a README ...
I don't know whether this is worthwhile to know or just an absurd detail: grub 1.97 is already grub 2, grub 1.96 is grub 1. Maybe we need personalized versioning mappings per developers ...
Who do we think we are?
First booting the laptop, directly after having bought it, launched a program
that explained me that this operating system is not mine but just borrowed.
If I cooperated, I would be allowed to use it. Cooperating means something like
letting that OS vendor look at my living room through the computer's camera.
This program forced me, by required input, to create an outlook or hotmail account.
It also asked for my full name, sex, age and phone number, all required inputs.
On the next page it asked me to repeat the 4 trailing numbers of my phone number.
There was no "Back" button :-)
I mean, this all happened before any operating
system (with closable windows) came in sight!
Keine Kommentare:
Kommentar veröffentlichen