Ubuntu 14.04LTS

By justmaggs ยท 11 replies
Apr 8, 2016
Post New Reply
  1. Hope this is in the correct forum. Couldnt find a dedicated linux one on here. I am still trying hard to learn code/scripts and terminal commands in ubuntu. I have trawled the Ubuntu forums for days but cannot find the details I need or anything that worked.

    Set Up: ssd drive running ubuntu and booting from grub.(SDA2) Sata drive running Windows 10 (SDB2) and booting from the windows bootloader (SDA1)
    The choice of OS shows up on the grub menu at boot up. I did this set up by installing windows, disconnecting the sata (windows) drive, installing Ubuntu and then reconnecting the windows sata drive.
    Prior to installing windows I disabled secure boot, even removed the secure boot keys, and disabled fast boot in the bios and immediately after installing windows BEFORE I installed Ubuntu I changed the power settings to disable hibernation and fast boot, and then stopped automatic updates.

    I can only get the windows drive to mount as read only. The icon appears in the launcher and opens ok.
    The error message is cant boot. windows is in hibernation. I then booted window 10 and removed the hiberfile via the cmd prompt. I also tried many other fixes found in Ubuntu forums but nothing worked. Most messages are "permission denied" All messages claim that windows is in hibernation

    Please can you tell me the best way to re-mount the windows drive SDB2 with rw permissions I suspect that removing the secure boot keys, secure boot and fast boot ubuntu may have installed as legacy while windows is in uefi as it can boot ok using its own bootloader.

  2. Leeky

    Leeky TS Evangelist Posts: 3,797   +117

    What is your physical partition structure of both disks?
    Where did you install the Grub bootloader to?
    From Linux terminal, what is the output of fdisk -l and cat /etc/fstab ?

    sda2 is a partition, not a disk. sda is the disk.
    The way it works with *nix is sda represents the first SATA disk, sdb the 2nd, and so on. The number in sda1 is the first partition on the first disk. sda2 is the second partition on the first disk, and so on.

    Are there more than two partitions on sdb? Windows usually creates a small System Reserved partition that would in this case be sdb1, and C:\ would end up being sdb2, assuming you don't have any OEM partitions for Recovery media and such. Hence asking, because it may not be sdb2 - the above will hopefully confirm.

    Most of these sorts of issues are caused by not having the disk connected when installing the Linux bootloader. It needs to know there is an existing Windows installation in order to setup the boot loading of both operating systems.
    justmaggs likes this.
  3. justmaggs

    justmaggs TS Rookie Topic Starter

    Hi Leeky. Thanks for the quick reply. Yes I understand about partitions but sometimes my linux language is not quite correct. Sorry Yes You are quite correct. I did all the disabling stuff in the bios then installed windows on the sata drive SDB2. Disabled all the hibernation stuff in windows then disconnected the sata drive and installed ubuntu on the ssd drive. During the ubuntu installation I left the windows bootloader intact and let ubuntu install grub. Then re-connected the windows sata drive.
    Grub menu on startup ubuntu and sda1 both booted into the relevant systems fine.
    After (ntfsfix) grub screen shows Ubuntu then sda label system reserved ntfs sdb1 label system reserved ntfs Ubuntu boots up fine and windows boots from both sda & sdb1.will double check this tomorrow. You are correct again Windows is on sdb2
    #Entry for /dev/sda2 :
    UUID=c0d626a9-d88d-4023-bf44-4bd62f1e4232 / ext4 errors=remount-ro 0 1
    #Entry for /dev/sda6 :
    UUID=89d8ca57-ce09-40e5-a95e-a80cf4088897 /home ext2 defaults 0 2
    #Entry for /dev/sda1 :
    UUID=2826E9C826E9975A /media/System_Reserved ntfs defaults,nls=utf8,umask=0222 0 0
    #Entry for /dev/sdb1 :
    UUID=62DA972ADA96F98D /media/System_Reserved_ ntfs defaults,nls=utf8,umask=0222 0 0
    #Entry for /dev/sdb2 :
    #Entry for /dev/sda5 :
    UUID=2a1f8105-5cd2-480e-a5c6-5ff9d39efd97 none swap sw 0 0
    Entry for /dev/sda2 :
    UUID=c0d626a9-d88d-4023-bf44-4bd62f1e4232 / ext4 errors=remount-ro 0 1
    #Entry for /dev/sda6 :
    UUID=89d8ca57-ce09-40e5-a95e-a80cf4088897 /home ext2 defaults 02
    #Entry for /dev/sda1 :
    UUID=2826E9C826E9975A /media/System_Reserved ntfs defaults,nls=utf8,umask=0222 0 0
    #Entry for /dev/sdb1 :
    UUID=62DA972ADA96F98D /media/System_Reserved_ ntfs defaults,nls=utf8,umask=0222 0 0
    #Entry for /dev/sdb2 :
    #Entry for /dev/sda5 :
    UUID=2a1f8105-5cd2-480e-a5c6-5ff9d39efd97 none swap sw 0 0

    UUID=105EDF9E5EDF7B44 /media/sdb2 ntfs defaults,nls=utf8,umask=0222,noauto,ro 0 0

  4. Leeky

    Leeky TS Evangelist Posts: 3,797   +117

    No problem re: Linux language, it can be confusing at first but you'll get the hang of it quickly.

    From reading your response I'm confused about a couple of things.

    If you installed Windows on what Linux is referring to as sdb, then system reserved will be sdb1, and C:\ sdb2.
    However, having removed it, I'm struggling to understand how you were able to setup Grub automatically with Windows as a secondary boot option.

    If the disk wasn't connected Linux, being installed on sda, wouldn't have a clue about sdb existing. Therefore the bootloader would only have installed the pre-requisite instructions to boot straight to Linux.

    I'm assuming this is why you then performed the repair to Grub?

    Which brings about another question. Is there a hangup from third OS here?

    Your disk order should be:
    sda: Linux (depending on whether you have a /boot partition or just /, it'll be sda1/sda2 etc).
    sdb: sdb1 "system reserved" and sdb2 "C:\ Windows"

    I'm confused why you are seeing:
    sda label system reserved (MBR record by the looks of it)
    sdb1 label system reserved (1st partition 100MB)

    This implies you have Windows "System Reserved" installed on two different hard drives.

    Where is the Linux bootloader installed to - Is it sda (Master Boot Record) or sda1 (if you are using a /boot partition)?

    The commands in my first response will clear it up. It's important to get it right from the beginning or any further/future updates to either OSes could wipe out the capability to load the other, or worst case, both.


    I see you posted them while I was replying.

    You do indeed have two System Reserved partitions, one on each disk. System Reserved should only be on the Windows disk (sdb in your case).

    sda should be:
    sda - Grub to MBR
    sda1 - /
    sda2 - home
    sda3 - SWAP (you have them slightly different but its not such an issue not having SWAP at end of the disk anymore).

    sdb should be:
    sdb1 - system reserved
    sdb2 - C:\ Windows

    This ensures that both systems are unique from one another.

    Can you copy/paste the output of cat /boot/grub/grub.cfg please you may need to prefix that with sudo to get it as root. I'd like to view your Grub configuration in more detail if possible. Thanks.

    As it currently stands, your sdb2 Windows partition is set to run as "ro", otherwise known as read-only. You'll need to open it as root to get it to edit.

    You can also edit /etc/fstab and remove the ro flag. Have a read up here for more information on fstab settings and configuration: https://help.ubuntu.com/community/Fstab#ntfs
    Last edited: Apr 9, 2016
  5. justmaggs

    justmaggs TS Rookie Topic Starter

    Hi Im so sorry but I must get to bed now. Its 1.40am here. I will double check everything for you tomorrow. But will just say that After I installed windows I booted up to check and disable all the hibenation stuff. Then I installed ubuntu. shut down and rebooted. Grub menu showed ubuntu first then sda windows bootloader. I was able to boot into both systems fine. I assumed that because the OS were on separate disks and I had left windows bootloader intact when installing ubuntu. The sata disk was able to boot from the windows bootloader and ubuntu from grub. Only windows is installed on the sata drive sdb2 and only Ubuntu on the ssd drive. No errors of any kind. No other OS installed. I only realised that something was wrong when I could not access windows from within Ubuntu. It was then I thought that it was not mounted but failed to understand how I could access windows from grub if it was not mounted. I tried all the advice offered but could not mount because of hibernation problems so eventually mounted in read only. I think now it was mounted but Ubuntu did not know it was mounted so gave the hibernation errors.
    thanks again cheers margaret
  6. Leeky

    Leeky TS Evangelist Posts: 3,797   +117

    Aye, it's gone 1:50 am here too - Guessing your also in the UK, or similar timezone?

    I'm subscribed to the thread so let me know if I can be of any further assistance by way of reply and I'll advise as best as I can.
  7. justmaggs

    justmaggs TS Rookie Topic Starter

    Hi Leeky, Gosh im so sorry, I thought that you were in the usa and it was probably around 9.00pm its nice to know you are in the Uk and almost as daft as me staying up to till the early hours playing Linux.

    OK I have got all the info for you but you have figured it out anyway. When I installed Ubuntu I used /boot. Immediately following the installation
    the grub menu showed Ubuntu and dev/sda1 windows bootloader. Initially I could not access windows at all from within Ubuntu. I guessed it was not mounted. Then following advice from other forums I added a line to the text editor
    UUID=105EDF9E5EDF7B44 /media/Windows ntfs-3g defaults,uid=1000,unmask=002 0 0

    followed by mount -a This gave me read only access to windows from within Ubuntu and the resulting windows in hibernation error.

    cat /boot/grub/grub.cfg as rquested.

    set timeout_style=menu
    if [ "${timeout}" = 0 ]; then
    set timeout=10
    ### END /etc/grub.d/30_os-prober ###
    cat boot grub
    ### BEGIN /etc/grub.d/30_uefi-firmware ###
    ### END /etc/grub.d/30_uefi-firmware ###

    ### 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.
    ### END /etc/grub.d/40_custom ###

    ### BEGIN /etc/grub.d/41_custom ###
    if [ -f ${config_directory}/custom.cfg ]; then
    source ${config_directory}/custom.cfg
    elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
    source $prefix/custom.cfg;
    ### END /etc/grub.d/41_custom ###

    thank you so much. Youre a star. happy to provide any further info you need, but please feel free to call time anytime you want to.
    Dont understand any of this script at all especially
    Be careful not to change # the 'exec tail' line above. I can find any exce tail'
    Anyway I will be installing another distro unto the sata drive but could possibly implement changes to boot menus then. Thanks your a star
  8. Leeky

    Leeky TS Evangelist Posts: 3,797   +117

    Yeah, as you've figured out, mounting the disk has no effect on the bootup process. Grub explicitly looks for the partitions that are listed in the configuration.

    Ubuntu is going to be the easiest for you to use in the beginning. Linux Mint is a very good alternative as it uses the same command structure and package management tools as Ubuntu (Mint is based off of Ubuntu repositories).

    Other distributions will have different package management tools and this adds to the confusion. Stick with Ubuntu or Mint for now and you'll find with time you'll naturally outgrow it and want to move onto other systems; such as Fedora, openSUSE, Slackware, Debian etc.

    Eventually, you'll find one that you find fits the bill perfectly and then remain there forever more. For me, that's openSUSE/SuSE for desktop and enterprise usage and CentOS for all web server usage.
  9. justmaggs

    justmaggs TS Rookie Topic Starter

    Hi Thanks I will stick with Ubuntu. A strange situation and probably a silly question. File manager/music shows only about 4 albums consisting of about 93 items. If I open rhythm box all my music is there, about 11 albums and over 150 songs. Why can I not find them in my music file.
    I have opened properties and the file destination is/home/margaret/ Music/music My name used to appear when I opened home but its not there any more and this I think is here the music is. Thanks
  10. Leeky

    Leeky TS Evangelist Posts: 3,797   +117

    You will only see your "username" folder if you navigate to it from the root of the file system.

    e.g. you click on filesystem or /, and then double-click on home, then you'll see your username. Double-click it again to find the Music folder.

    Are you logged in as root? If so, you shouldn't be. Always log in as a user account and use sudo to escalate to root if required.

    Is it picking up songs from your C:\Windows partition or is this not mounted?
  11. justmaggs

    justmaggs TS Rookie Topic Starter

    Hi sorry to be such a thicko. was not sure where to input /, Terminal says command not found. Double clicking on home, no response other than opening the folder.

    Anyway while I was trying I clicked the "music" text on the left sidebar under "places" File opened and there was a little plus sign in the top right corner. Clicked this and all my music appeared.

    I usually just click home and then select the folder that I want. Anyway closed the files and clicked music in the sidebar again. All gone and no little +sign to get it back. But at least we know its there somewhere.

    Hovering over "music" in the sidebar gives file path as /home/margaret/music so im still there

    I think im logged in as user as terminal usually asks for my password.

    Havent input my saved data to windows yet but yes it is accessible in read only.

    I have been inputting my backed up data into Ubuntu. Spring cleaning the data at the same time so long and boring.

    I will be installing Zorin onto the windows sata drive soon. If I removed the windows bootloader it should still boot from the grub menu. ?????? then I can change to rw Yes?? Linux is never that simple lol

    When I have got everything set up I want to install a vitual box to learn and perhaps experiment a bit with. Might be brave enough then to try suse. I think suse is from the Red hat sort of mandriva distros. These always sound very advanced to me.

    I have been using Ubuntu as my daily OS for over two years now. bought lots of books and read loads of tutorials but unless one studies on a regular basis the fragmented variations are difficult to retain. However really trying to fix something is the best learning curve but not possible without people like you. So again big thanks
    [email address removed]
    Last edited by a moderator: Apr 11, 2016
  12. Leeky

    Leeky TS Evangelist Posts: 3,797   +117

    To navigate to a directory in Linux you type cd [directory]. For example:
    cd ~/ would take you to your home directory
    cd / would take you to you root directory
    cd /root would take you to the root user account directory

    If you type ls in terminal, from within any directory, it will show you the contents.

    You need to keep the System Reserved if you want Windows to run. Grub hands over to System Reserved to boot Windows. If that partition is missing Windows will fail to boot.

    Virtualbox is easy enough to install. You can download the necessary .deb file from Virtualbox's website. Another very good alternative is VMWare Player. Again, the installer should be downloadable from their website. Virtualbox should also be in Ubuntu's repositories - sudo apt-get install virtualbox-5.0 dkms will get the required packages and install it for you.

    SuSE is an rpm-based distro, same as Red Hat (RHEL), CentOS and Fedora. Fedora is used as RHEL's testing ground before implementing changes to their enterprise RHEL OS. CentOS is a snapshot of RHEL, save for two proprietary packages that RHEL have copyrighted.

    For further information, SuSE's history can be found here: https://www.suse.com/company/history/

    openSUSe's installer is very mature and you'll have no issues following it and getting this OS up and running. You may also find that YaST gives you far more control of your system settings without having to resort to the command line. This OS has by far the most mature and best GUI administration tools of many OSes.

    No problem at all.

    I recommend you focus on how Linux operates and the fundamentals to advance further in regards to knowledge. Package management types aside, all Linux distros behave the same under the covers. Learning these fundamental commands -- especially those used in terminal -- will set you up with knowledge to use any Linux distro.
    Last edited: Apr 13, 2016

Similar Topics

Add your comment to this article

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...