LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 01-24-2016, 09:51 PM   #1
linuxStudent11
Member
 
Registered: Jun 2007
Posts: 164

Rep: Reputation: 18
Squeezed Win10 won't let Ubuntu Casper start


I just installed Casper onto a Lenovo Flex 3 running Win 10.
BUT IT DID THE SQUEEZE SO GRUB/UBUNTU IS A MIDDLE PARTITION.
So the boot process can't find GRUB(2). It still goes to UEFI. And that only knows about win10.
  1. Can I install grub or lilo at the beginning somehow?
  2. Can I put grub onto a thumbdrive with a link to ubuntu-in-the-middle?
  3. Can I cause UEFI to find Casper?
  4. Should I delete the ubuntu install and start over forcing (somehow) the installer to put ubuntu at the beginning? But shouldn't the installer have modified the MBR so it points to the GRUB partition (in the middle)?
I thank any/all respondents in advance for your help.
 
Old 01-24-2016, 10:58 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
By "squeeze" do you mean partition resizing ?.

1. No
2. No
3. Yes - check for a key (maybe Esc, F9, or F12) at boot that gives you a boot list (like grub, but at initial power-on). This is the UEFI boot menu, and should have an entry for Ubuntu - select that.
4. No

From Ubuntu (on-disk or liveCD) run this command from a terminal and post the output
Code:
sudo parted /dev/sda "print free"
 
Old 01-24-2016, 11:55 PM   #3
linuxStudent11
Member
 
Registered: Jun 2007
Posts: 164

Original Poster
Rep: Reputation: 18
Quote:
sudo parted /dev/sdb "print free"
Code:
Model: ATA WDC WD10SPCX-24H (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name                          Flags
        17.4kB  1049kB  1031kB  Free Space
 1      1049kB  274MB   273MB   fat32           EFI system partition          boot, esp
 2      274MB   290MB   16.8MB                  Microsoft reserved partition  msftres
 3      290MB   720GB   720GB   ntfs            Basic data partition          msftdata
        720GB   720GB   225kB   Free Space
 8      720GB   720GB   1049kB                                                bios_grub
 9      720GB   943GB   222GB   ext4
10      943GB   951GB   8034MB  linux-swap(v1)
 4      951GB   978GB   26.8GB  ntfs            Basic data partition          msftdata
 5      978GB   979GB   1049MB  ntfs            Basic data partition          hidden, diag
 6      979GB   999GB   20.4GB  ntfs            Basic data partition          diag
 7      999GB   1000GB  1049MB  fat32           Basic data partition          hidden
        1000GB  1000GB  729kB   Free Space
EFI boot priority put below thumbdrive etc. I'm in tryout mode for ubuntu (off the thumb drive). Security mode is off.
The only way I can talk to EFI on this Lenovo is to boot windows, then SHIFT-restart to get the EFI menus. But no EFI menu choice (that I can find) displays the middle partition that contains either linux or grub...sigh. ...and Lenovo customer support pages don't have relevant suggestions.
The only thing I can think to do is delete ubuntu partitions, move the (squeezed) ms partions away from the front, and rebuild ubuntu manually at the (now vacated) beginning of /dev/sdb.
(or I might try building customizing grub on the thumbdrive to point to /dev/sdb9 where ubuntu lives.

EDIT ADDITION:
Quote:
The only "Boot Menu" I can find (using F12) is a menu with 4 choices:
1. Windows Boot Manager
2. ATA HDD: WDC drivestuff
3. PCI LAN: EFI Network (IPv4)
4. PCI LAN: EFI Network (IPv6)
None of these go to Ubuntu on /dev/sdb9 (or grub on /dev/sdb8)

ANOTHER ADDITION:
I've done choice grub choice 2 above, put a custom drive name into the grub menu (on a floppy!) that pointed to a partition with fedora (or maybe something else) on it.

Last edited by linuxStudent11; 01-25-2016 at 01:06 AM. Reason: more details
 
Old 01-25-2016, 02:59 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Quote:
Originally Posted by linuxStudent11 View Post
I just installed Casper onto a Lenovo Flex 3 running Win 10.
You had better explain, in detail, what you mean by this. I assumed you were trying to do a normal Ubuntu install, but that partition list doesn't make sense for a UEFI install. I don't use Ubuntu, but Mint recognises the UEFI, and installs into the EFI partition as it should. It appears your install was for gpt on a BIOS (not UEFI) firmware system.

Like I said, doesn't make sense to me.
 
Old 01-25-2016, 10:40 AM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,510

Rep: Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491
Casper is a directory for the different Ubuntu distributions on the Live CD and you won't see it on an installed system. Not sure what you mean by "installed casper"? If you have windows 10 using UEFI, you need to boot and install Ubuntu UEFI or you will have problems. Explanation at the Ubuntu site below.

https://help.ubuntu.com/community/UEFI

Last edited by yancek; 01-25-2016 at 09:10 PM.
 
Old 01-25-2016, 06:34 PM   #6
linuxStudent11
Member
 
Registered: Jun 2007
Posts: 164

Original Poster
Rep: Reputation: 18
Oops, sorry. I thought that was the Ubuntu version name. I installed ubuntu-15.10-desktop-amd64.iso which I had d/l'd a week ago. I executed the installation iso from a thumbdrive.

The 1TB harddisk on the lenovo flex 3 laptop arrived from the manufacturer completely partitioned having no free space available. I clicked the install button to install ubuntu "BESIDE" the win10 partitions. I used gnome-disks to observe what it did. It squished the existing win10/lenovo partitions to about 75 their original size. This made a freespace "hole" of about 250G. In this hole the ubuntu 15.10 created 3 new partions, numbered 8,9,10 in the list you see above. And /dev/sdb8 appears to be a grub /boot partition. I had assumed the ubuntu install would somehow link the /dev/sdb MBR to point to that GRUB partion.
No such luck.
@svg00: I did no "EFI install". I don't know how to do that. I turned all that off because I could not boot to the thumbdrive without bypassing EFI. I put the EFI boot very low in (what looked like) the boot priority list. I put the thumbdrive at the top of (what looked like) the "bios" boot priority list. Is that a no-no?
 
Old 01-25-2016, 09:22 PM   #7
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,510

Rep: Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491
I guess it's too late now but, when resizing windows partitions you are always better off using a windows tool such as the Disk Management program. After doing that you should also run chkdsk from windows. If you are going to use UEFI and if windows is installed as UEFI, you will have to or one of the systems will fail to boot. I believe you would be better off using the manual installation option which Ubuntu calls "Something Else".

I don't use UEFI myself but my understanding of it is that if you are using GPT with windows, you must use UEFI which is what you have. You did not install Ubuntu using UEFI which can be seen because partition 8 is a BIOS boot partition. On Linux that is used if you are using GPT and not using UEFI. You don't want that. The other two partitions (9 and 10) are the Ubuntu system and a swap partition.

Quote:
I had assumed the ubuntu install would somehow link the /dev/sdb MBR to point to that GRUB partion.
You don't want to install anything to the MBR when you are using UEFI.
Did you read the link I posted earlier? If you can't get it working, go to the boot repair link below and get the software downloaded and put it on a CD and boot with it and select the option to Create BootInfo Summary and post it here for some to look at as it will have detailed info on your system.

https://help.ubuntu.com/community/Boot-Repair
 
Old 01-25-2016, 09:57 PM   #8
linuxStudent11
Member
 
Registered: Jun 2007
Posts: 164

Original Poster
Rep: Reputation: 18
@yancek: I'm reading both your links now. Your help has been awesome.
This is my first exposure to UEFI (which I think is potentially dangerous to linux). I'm guessing I can install either way once I read/understand your EXCELLENT links.
 
Old 01-31-2016, 07:24 PM   #9
linuxStudent11
Member
 
Registered: Jun 2007
Posts: 164

Original Poster
Rep: Reputation: 18
ok, I'm getting back to this.
I switched to debian installation after ubuntu. I read the two (nice) pages you suggested. And I read some other just in case. I then did a UEFI install.
But debian fails with the message:
Quote:
Grub install-dummy failed.
This is a fatal error.
BTW: The disk is encrypted-lvm and I'm doing this all for a friend.
So I boot up using the graphical rescue shell on the debian install disk. I give the pasphrase and I'm IN !!! just no friendly X11 interface. Only a shell. So I could:
1. manually launch X11 (choke) and just live with it...in root.
2. go back to building an actual grub partition on a thumbdrive and revert to old GRUB2 boot (and forget the f****ing UEFI)...doing cross disk booting. I've done this before.
3. Edit the uefi config files (most elegant) to handwire them into UEFI.
The first page yancek provided says that many manufacturers have not correctly implemented the EFI spec and this is why so many people are complaining about working with it. MS is happy with this situation of course. Some oem's actually grep out any os that doesn't say "windows"...which makes me grind my teeth and make me want to hack EFI even more.
I've found a couple workaround pages but they all look hard and are therefore prone to failure.
Suggestions?
 
Old 02-01-2016, 10:08 AM   #10
TxLonghorn
Member
 
Registered: Feb 2004
Location: Austin Texas
Distribution: Mandrake 9.2
Posts: 702

Rep: Reputation: 231Reputation: 231Reputation: 231
I don't know much about installing debian - but with ubuntu you should have no problem.
You access the boot menu with F12 (as you did) for a Lenovo, and you access the basic EFI settings with F1.
Be sure to disable Windows "Fast Startup" and hybernation first.
Then reboot and enter your EFI settings. Set it to boot in UEFI mode with "Secure Boot" off.
When you boot your install USB, open a terminal and enter this command to verify that you have booted in UEFI mode:
Code:
[ -d /sys/firmware/efi ] && echo "Currently in EFI mode" || echo "Currently in Legacy mode"
Open the gparted program and delete the existing linux partitions - sdb8, sdb9, sdb10
Then you can proceed with the "Alongside" installation, and the necessary partitions will be created for you.
 
Old 02-03-2016, 11:23 AM   #11
linuxStudent11
Member
 
Registered: Jun 2007
Posts: 164

Original Poster
Rep: Reputation: 18
ok, I'm still working on this but without much success. I've switched to my scripts that I know work (that do similar things). But I've discovered how much of grub is NOT DOCUMENTED!
  1. What happens when 'cryptomount -u' is given no argument (and you've got several encrypted drives)?
  2. Is the variable "root" used for SEVERAL purposes in a typical auto-generated script? It is used all over the grub.cfg.
  3. What exactly do the various --hint keywords in the search command mean/do?
  4. At what point in the load process does cryptomount actually execute? It appears to do something AFTER initrd executes, correct?
  5. Does cryptomount actually work when given a UUID? I usually get failures, except in generated scripts.
  6. During grub execution, is there a definitive place to look for mappings between hw disk names (hd00,1) and UUIDs, and /dev/sde5 names? The autogenerators don't usually build the driver.map file. Why?
  7. The 'search' command seems to work only at random times. Why?
  8. The 'kernel' command at the end takes several arguments. How do I make sure the correct values are in those argument variables? The generated scripts do not appear to set them.
  9. Does the cryptmount actually happen during that kernel command?
  10. And I can think of other questions/problems. Is there a complete and definitive doc that describes grub (more than info grub)? I bet I'm about to pull source code off github.... Link?
Please help. This effort is becoming purgatorially painful.
 
Old 02-03-2016, 11:46 AM   #12
TxLonghorn
Member
 
Registered: Feb 2004
Location: Austin Texas
Distribution: Mandrake 9.2
Posts: 702

Rep: Reputation: 231Reputation: 231Reputation: 231
I can't help any with the "cypto" things - never used it.
Question 8 is not easy to answer. There are many different variables, depending on your hardware.
This page contains some great links for Grub Linux Linx 2016 particularly the first 2 listed.
 
Old 02-03-2016, 04:18 PM   #13
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,510

Rep: Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491
As complete and definitive documentation you will get for Grub2 is the official Grub2 Manual at the link below.

http://www.gnu.org/software/grub/manual/grub.html

Have you gone to the boot repair link I posted earlier and run it. Select the Create Bootinfo Summary option rather than trying to repair and post a link to the output or post the output here. Your earlier post indicates a BIOS boot partition plus an EFI partition. The BIOS boot partition is used with GPT and MBR and it is not needed with UEFI. Posting the output of the boot repair script will give a lot of information and help toward resolving this issue. I don't use encryption either so I don't know what problems that causes.
 
Old 02-04-2016, 04:47 AM   #14
linuxStudent11
Member
 
Registered: Jun 2007
Posts: 164

Original Poster
Rep: Reputation: 18
Thanks for responding again yancek.

I chose not to load the "boot-repair" since my goal has been to understand as much as anything. Also, I've been (perhaps wrongly) very suspicious of EFI, given that many manufacturers are rumored to have implemented UEFI incorrectly. Can boot-repair actually perform workarounds for them?

At this point, I think I will turn on "legacy boot", try to move win10 away from the front of the main drive, and do a legacy install of debian at the beginning complete with an MBR. Failing the move I'll attempt a cross-disk embedding install of grub onto a thumb drive. I've had easiest best luck doing that several times in the past. (in use on my main system) Failing those I might even advise my friend to simply wipe the whole f***ing win10 system and put in a win7 I have on top of vbox/debian again legacy boot.

Also, I did look through the manual url you gave. But it says very little about encryption. It does not even mention "cryptomount". ((Why?)) So all related questions are not addressed. Maybe 1 or 2 of the other questions could be answered if I read the whole manual couple times. Obviously, that's a low return/risk ratio. But, you'd be right, so is everything else.

...hence my word "purgatorial".
Quote:
Bill Gates: You know what? IT DOESN'T MATTER!
 
Old 02-04-2016, 07:53 AM   #15
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,510

Rep: Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491
You can learn a lot from the boot repair script if you just select the Create BootInfo Summary option. It doesn't make any changes and you can save the output to your machine which has the advantage of having a lot information about boot files, drive/partition and other useful info in one file.

Some companies do not comply with the standads set by the developers of UEFI but there are always workarounds and UEFI will be used on all computers at some time.

My understanding of GPT on windows is that if you are using GPT then you must use UEFI. I believe that is indicated in one of the links I posted earlier. So if you re-install windowss 10 using Legacy, you won't be able to use GPT.

I'm not sure why you want to move Debian to the beginning of the drive. If you use Legacy, you will need at least the windows boot files on a primary partition which is not necessary with Debian which can be installed to a logical partition, boot files included.

You can installed windows 10 in Legacy mode and not use UEFI/GPT. I'm not sure this can be changed without re-installing windows.

When you installed Debian EFI, did you have a separate EFI partition on the drive to which you installed it?

I have never used LVM or a separate boot partition so have no suggestions. You might take a look at the link below regarding encryption with Grub.

http://www.pavelkogan.com/2014/05/23...sk-encryption/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Guest Ubuntu 15.04 OS VMware tools. won't install. Host is Win10 LucyFur Linux - Virtualization and Cloud 12 02-13-2017 04:32 PM
Disable casper autologin on remastered Ubuntu 10.04 LiveCD Canadian1296 Linux - General 2 12-05-2011 09:07 PM
Ubuntu Casper USBDISK Custom Boot Options metallica1973 Ubuntu 12 10-19-2010 02:57 PM
Ubuntu won't start :( elishac Linux - Newbie 34 12-31-2009 12:23 AM
K Ubuntu won`t start banso_boy Linux - Newbie 2 04-16-2008 01:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 08:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration