You are Here:
Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section



[SOLVED] Dual-boot or multi-boot of Linux Lite (and others) with Windows 7

Author (Read 26738 times)

0 Members and 1 Guest are viewing this topic.

Re: [SOLVED] Dual-boot or multi-boot of Linux Lite (and others) with Windows 7
« Reply #17 on: January 16, 2016, 05:23:46 PM »
 

br1anstorm

  • Occasional Poster
  • **
  • 72
    Posts
  • Reputation: 4
  • Linux Lite Member
    • View Profile
Just one additional or supplementary question on the "gold_finger route" to make all this work, since I have been thinking-through what to do while awaiting comments on my description of the unsuccessful efforts so far.

This may be an obvious, or dumb, question.

If - as suggested - I go into Mint and delete all its grub packages (and remove the Mint entry from EasyBCD), then even if EasyBCD is able to find Linux Lite, will Linux Lite (whose grub does currently list Mint) then be able to boot Mint into action?  Doesn't LL's grub need to see and hand over the booting task to Mint's own grub?  Or can LL's grub boot Mint up if Mint itself doesn't have any grub packages?
 

Re: [SOLVED] Dual-boot or multi-boot of Linux Lite (and others) with Windows 7
« Reply #16 on: January 16, 2016, 09:48:08 AM »
 

br1anstorm

  • Occasional Poster
  • **
  • 72
    Posts
  • Reputation: 4
  • Linux Lite Member
    • View Profile
Okay..... next episode.

Went into LL root, found and re-copied the entry, then re-pasted it via the Mint terminal into the Mint Grub boot menu.  Seemed to work this time.

So I then did the "sudo update-grub" in the Mint terminal;  and this is what I got in the terminal screen.

Quote
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.19.0-32-generic
Found initrd image: /boot/initrd.img-3.19.0-32-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
  No volume groups found
Found Windows 7 (loader) on /dev/sda1
Found Windows Recovery Environment (loader) on /dev/sda4
Found Linux Lite 2.6 (14.04) on /dev/sda7
error: out of memory.
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 386
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
done

I'm posting this before I reboot, so I don't know what, if any, change or update has actually happened in Mint's Grub boot menu.   I guess I will discover any change after I reboot.  But I do wonder, and worry, about whatever the "syntax error at line 386" and "in the generated Grub config file" might be.

Are these a consequence of the peculiarities or tweaking of the design of the LL Grub, I wonder, and an example of the 'not playing nicely' problem?

EDIT/UPDATE:  Well, didn't take long to find out the result.  Rebooted, got to Mint's Grub screen, and...... no change.  The listing of options (Mint, recovery mode, memtest, Win7 etc) all exactly the same as before.  No trace of Linux Lite as an additional option.  So the alternative route of inserting LL into Mint's Grub, seems not to have worked, which is a pity.  But what puzzles me is why it worked for austin.texas (who suggested it) and isn't working for me.  The "syntax error" must surely be part of the reason?

Just in case it helps with the detective work, once I had rebooted into Mint I went into the file manager and had a look into its /boot/grub.  In there I noticed two grub (menu?) files, grub.cfg and grub.cfg.new.  The latter was modified today. ......and it includes the Linux Lite entry - in fact more than one.  And line 386 in that cfg.new file is actually the very last line, not a part of the body of the LL entry.  I have no idea what this means....!  I can copy and paste the whole of that grub.cfg.new file if that would help to figure out the error.
« Last Edit: January 16, 2016, 10:13:23 AM by br1anstorm »
 

Re: [SOLVED] Dual-boot or multi-boot of Linux Lite (and others) with Windows 7
« Reply #15 on: January 16, 2016, 09:33:11 AM »
 

br1anstorm

  • Occasional Poster
  • **
  • 72
    Posts
  • Reputation: 4
  • Linux Lite Member
    • View Profile
Well, gold_finger, the story continues.....

Latest chapter.  I tried the "austin.texas" route of inserting the LL entry into Mint's Grub boot menu.  I successfully copied and pasted into the 40_custom file and saved it.  But then in the terminal I got this:


Code: [Select]
(gedit:2731): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.I614AY': No such file or directory

(gedit:2731): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

(gedit:2731): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.O5O0AY': No such file or directory

(gedit:2731): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

I have no idea what all that means.  But I assume the inserting/pasting was unsuccessful.  Your most recent post appeared to suggest that it might not work.  So I am about to try your advice to

Quote
start again but right-click LL root partition and choose "Open as root/administrator"; then copy and paste the menu entry again.

Will post follow-up once I have tried that.
 

Re: [SOLVED] Dual-boot or multi-boot of Linux Lite (and others) with Windows 7
« Reply #14 on: January 15, 2016, 07:22:07 AM »
 

gold_finger

  • Documentation Writer
  • Platinum Level Poster
  • *****
  • 1094
    Posts
  • Reputation: 325
  • Linux Lite Member
    • View Profile

  • CPU: Intel Core2 Duo E7500 3.0GHz

  • MEMORY: 4Gb

  • VIDEO CARD: Intel 4 Series Integrated Graphics
Before I started, I just thought well, I'll take another sneak peek into the LL grub file to see if I can see and interpret the menu entries that are in there.

And sure enough, as I think you had correctly guessed or presumed, LL's Grub file does indeed list in its menu entries not only LL and Win7, but also Linux Mint.  So when I installed LL, I guess it automatically spotted and included the Mint installation that was already there?

Yes -- when you installed, it looked for and listed any other OS's on the computer and added them to grub menu.  If you had installed Mint second, Mint would have done the same thing.  When you install PCLOS, it will do that too and it's grub will list Windows, Mint and LL.


I did not uninstall Mint's grub (as your advice suggested).  Being naturally cautious, I hate removing/deleting /uninstalling in case I can't later recover or reinstate things!  I just went into Win7 and removed the "Mint" entry from the EasyBCD menu, leaving just Win7 and Linux Lite as listed options (it is quite clear that removing the Mint entry from EasyBCD's menu does not delete the OS itself).  Then in the EasyBCD menu I selected Linux Lite to boot into.  I wanted to see if EasyBCD would know - or would now go and look for - Linux Lite's grub.

As usual, first up came the Windows bootloader screen (now showing only Win7 and LL).  I selected LL.   What came up?  Yes, Mint's Grub screen again (still showing no LL). 

What does that prove?

I don't "know" for sure what EasyBCD is doing, but from prior discussion I suspected that once it set itself to use one, it would point to that one for any others it finds and lists later.  That was my reasoning for suggesting to delete Mints grub.  That way it wouldn't be able to find it anymore when told to refresh the menu and would be forced to find only LL's grub, causing it to then use that.  So, your experiment with just deleting the Mint entry (without actually deleting Mint's grub) seems to confirm my suspicion.

If you end up deciding to try my method, clear Mint and LL entries from EasyBCD, then have it look for OS's and make brand new entries.  My guess is that it will only list Windows and LL, but when you select LL it's grub menu will then show entry for Mint.  If PCLOS uses legacy grub, then it sounds like you'll be able to add that directly to EasyBCD.  You can also add it to LL's grub if you want to by booting into LL and running "sudo update-grub" after you've installed it.

However, like I said before, I do think austin.texas's solution will be simpler.


As I understand that issue, put simply, LL works well as "lead" grub and sees and boots other distros;  but the grubs of other distros (like Mint) don't always see or work well with LL.
It's not that other distros fail to "see or work well with LL".  One or two standard lines in grub code that all distros look to and use to boot others they find was altered/customized in LL -- so they don't work as expected anymore when pointed to by other distros -- causing failure to boot LL.  The change(s) to LL were made to make things easier for new Linux users who dual-boot with Windows.  I don't dual-boot with Windows, so I don't really know what about the menu is "easier" than what one would see without the change(s).

When I first started using Linux and did dual-boot with Windows, I honestly didn't think there was anything particularly confusing or difficult about the grub menu I was seeing -- so not sure if such modifications are really necessary.


If I do go forward with the manual-insertion of LL into Mint's boot menu (the austin.texas route) having now looked into the actual "texts" in the grub files of both distros, I will need to get absolute clarity on where to paste-in the additional menu entry.  But I will put that into a separate post.

His post here pretty much spells it out.
  • Boot into Mint and open a terminal
  • Enter "gksu gedit /etc/grub.d/40_custom" (without the quotes) to open the 40_custom file as root.  This is what you'll see:
Code: [Select]
#!/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.
    [/li]
  • Now open Mint's file manager and open the LL root partition
  • Navigate to LL's  /boot/grub/grub.cfg file and open it.
  • Find first menu entry and copy it in its entirety (including the last "}" as shown in his post)
  • Paste that into your opened 40_custom file right under the last comment line.
  • If can't paste, start again but right-click LL root partition and choose "Open as root/administrator"; then copy/paste the menu entry again.
  • Save file and run "sudo update-grub" in Mint terminal.
  • Next reboot should then have a working LL entry in Mint's grub.
Try Linux Beginner Search Engine for answers to Linux questions.
 

Re: [SOLVED] Dual-boot or multi-boot of Linux Lite (and others) with Windows 7
« Reply #13 on: January 14, 2016, 05:49:30 PM »
 

br1anstorm

  • Occasional Poster
  • **
  • 72
    Posts
  • Reputation: 4
  • Linux Lite Member
    • View Profile
Hmmm....

I haven't embarked on austin.texas' "alternative solution" yet, though that's what I was aiming to do.  Before I started, I just thought well, I'll take another sneak peek into the LL grub file to see if I can see and interpret the menu entries that are in there.

And sure enough, as I think you had correctly guessed or presumed, LL's Grub file does indeed list in its menu entries not only LL and Win7, but also Linux Mint.  So when I installed LL, I guess it automatically spotted and included the Mint installation that was already there?   I certainly didn't "sudo update" LL's Grub, because after I installed it I was unable to boot into LL since EasyBCD did not see or offer it... 

So just to be clear:  did LL see and include Mint in its grub automatically (ie without "sudo update-grub") as soon as I installed it?

Incidentally just to be clear about the installs, I have Mint and its Grub on dev/sda6, and LL with its Grub on dev/sda7, then dev/sda8 is still empty and earmarked for PCLOS, and dev/sda9 is the shared DATA partition.

I went one step further, just because I was curious. 

I did not uninstall Mint's grub (as your advice suggested).  Being naturally cautious, I hate removing/deleting /uninstalling in case I can't later recover or reinstate things!  I just went into Win7 and removed the "Mint" entry from the EasyBCD menu, leaving just Win7 and Linux Lite as listed options (it is quite clear that removing the Mint entry from EasyBCD's menu does not delete the OS itself).  Then in the EasyBCD menu I selected Linux Lite to boot into.  I wanted to see if EasyBCD would know - or would now go and look for - Linux Lite's grub.

As usual, first up came the Windows bootloader screen (now showing only Win7 and LL).  I selected LL.   What came up?  Yes, Mint's Grub screen again (still showing no LL). 

What does that prove?  It seems that even though I had taken Mint off the EasyBCD menu, EasyBCD still goes to the Mint Grub which sits, with Mint itself, in dev/sda6!

Not sure how interesting or useful that knowledge is.  It suggests that EasyBCD doesn't, perhaps, "search" for  Grubs (or once it has a grub2 identified, it doesn't then look for others!). 

But this does confirm that either I have to insert LL manually into that Mint grub, as austin.texas recommends, since Mint evidently didn't see and automatically incorporate LL when I installed LL;  or I have to make LL's Grub the "go-to" one for EasyBCD, which - as you have advised - means actually removing/uninstalling Mint's grub files.

So I'm back to the angle which originally surfaced in separate earlier threads about the way in which LL's grub plays with other Linux grubs.  As I understand that issue, put simply, LL works well as "lead" grub and sees and boots other distros;  but the grubs of other distros (like Mint) don't always see or work well with LL. 

If true, that may be an argument for going the gold_finger route (making LL the lead, since it has already seen and included Mint) rather than the austin.texas route (manually inserting LL into Mint's Grub, doing sudo update and then relying on Mint's grub as the sole Grub2 and booting into LL from there).

If I do go forward with the manual-insertion of LL into Mint's boot menu (the austin.texas route) having now looked into the actual "texts" in the grub files of both distros, I will need to get absolute clarity on where to paste-in the additional menu entry.  But I will put that into a separate post.

The saga continues......

 

Re: [SOLVED] Dual-boot or multi-boot of Linux Lite (and others) with Windows 7
« Reply #12 on: January 14, 2016, 05:52:25 AM »
 

gold_finger

  • Documentation Writer
  • Platinum Level Poster
  • *****
  • 1094
    Posts
  • Reputation: 325
  • Linux Lite Member
    • View Profile

  • CPU: Intel Core2 Duo E7500 3.0GHz

  • MEMORY: 4Gb

  • VIDEO CARD: Intel 4 Series Integrated Graphics
If it doesn't work, then I may try your route.  The other alternative would be to go back to almost the beginning, uninstall both Mint and Lite, reinstall them with Lite first, and then use the same manual copy-and-paste to insert Mint into LL's Grub2.....which is another variation of the austin.texas suggestion, just making Lite's grub the "lead" one.

I don't think you'll need to start from scratch re-installing LL and Mint.  If editing Mint's grub doesn't work, then my alternative above will accomplish same thing as if you started from scratch.  (Delete Mint's grub from install;  then clear/delete the Linux boot choice(s) that were in EasyBCD; then have EasyBCD search for bootable Linux again and it should only find LL's grub, which will hopefully be able to boot both Linux's.
Try Linux Beginner Search Engine for answers to Linux questions.
 

Re: [SOLVED] Dual-boot or multi-boot of Linux Lite (and others) with Windows 7
« Reply #11 on: January 13, 2016, 07:32:34 PM »
 

br1anstorm

  • Occasional Poster
  • **
  • 72
    Posts
  • Reputation: 4
  • Linux Lite Member
    • View Profile
Thanks, gold_finger.  You and I have both been in both forums, and thanks for your "edit" advice.  I plan to try that alternative route.  Will report progress in both threads.

meanwhile -- and equally speculatively - I offer just a few observations on your thought-process.

.....
Based on your description of problem, I'm going to make a purely speculative guess at a possible solution.  Here's my thought process.

From the sounds of it, if you choose to boot Linux, EasyBCD passes booting responsibility to grub which then boots the distro.  If more than one distro uses grub2, it only recognizes and lists one of them for booting.  If the distro's grub that takes over has been updated to include boot choices for other installed distros, they will then show on the grub menu and can boot from there.  (That is my speculation.  I don't know that to be true.)

Thst coincides with my understanding.  It's also the basis for the alternative solution (which is to put LL into Mint's grub boot menu and it will then show as a choice when EasyBCD hands the booting on from the Windows bootloader screen to the grub2).

Quote
I'm guessing that when you choose Mint from EasyBCD menu, it either boots straight into Mint, or shows grub menu with only Mint choices for booting and no choices to boot LL.  I say that because I'm guessing you never went into Mint and updated grub to include LL because you knew ahead of time that LL would not boot properly that way.

You give me too much credit!  I didn't know or even assume that.  I just understood, and EasyBCD leads one to believe, that if you tell it which partition to look in for the distro you choose, it goes (I know not how....) directly to that location and triggers that distro's bootloader.  Evidently it doesn't quite do that.  But equally, the EasyBCD guidance doesn't tell you that if you install more than one Grub2 distro then you have to update the grub of one (the first?) of them so that it also lists the other.

What happens when I boot after setting up the second, and/or third OS in EasyBCD is that I first see a Windows bootloader (MBR?) screen which lists all the OSs I had listed in EasyBCD.  Clicking on Win7 boots up Windows, end of story.  When I had only added Mint, of course, the Windows boot screen showed Win7 and Mint.  Choosing Mint took me on to the Grub2 screen offering Mint (and still also listed Win7) and I was able to boot into it.  Then I added Lite - as the third OS.  When I chose it on the first (windows MBR) screen, the Grub2 screen appeared, but still only offered the Mint boot options.... and listed Win7.  In other words, EasyBCD still only "sees" the one Grub2, which in this case was Mint's.

Thus although I have installed Lite, and its Grub, on a separate partition (and can access those files/folders via Mint's file manager) I cannot, at present, boot into Lite at all.

I agree that - in the short term - the simple solution, if it works, is to add Lite, which I installed second, to Mint's Grub which was there first and which EasyBCD seems able to find.   If that works it works..... and all I would need to do is amend the listing in EasyBCD's "menu" to show Mint and Lite as being in effect a single choice.  Once I get to (Mint's) grub2 screen, I should see both Mint and Lite listed, having manually copied and pasted Lite in and done sudo update grub .  So at that point I then make my "secondary" choice of OS to boot, as between Mint and Lite.

If it doesn't work, then I may try your route.  The other alternative would be to go back to almost the beginning, uninstall both Mint and Lite, reinstall them with Lite first, and then use the same manual copy-and-paste to insert Mint into LL's Grub2.....which is another variation of the austin.texas suggestion, just making Lite's grub the "lead" one.

After that, my ambition for the next stage is to add PCLinuxOS, which uses Grub Legacy, on the remaining empty partition.  If my understanding of EasyBCD is correct, it will "see" that distro, with its Grub Legacy,  as being separate and different from Mint and Lite, so I may be taken straight there if I choose to boot that OS.  We shall see.

As I said, watch this space.  I thought this exercise would be an "Easy" jog in the park.  It's becoming more like a marathon.  But so far, I'm not feeling any pain.....
[/quote]
 

Re: [SOLVED] Dual-boot or multi-boot of Linux Lite (and others) with Windows 7
« Reply #10 on: January 12, 2016, 08:10:12 PM »
 

gold_finger

  • Documentation Writer
  • Platinum Level Poster
  • *****
  • 1094
    Posts
  • Reputation: 325
  • Linux Lite Member
    • View Profile

  • CPU: Intel Core2 Duo E7500 3.0GHz

  • MEMORY: 4Gb

  • VIDEO CARD: Intel 4 Series Integrated Graphics
EDIT ADDED LATER:  Just saw that you have similar post for help on Mint forum.  You received a reply with possible solution to booting both Mint and LL from austin.texas that sounds like it may work and should be easier than what I have posted below.  Would recommend you try his solution first.  If doesn't work, then try mine below.

==========================================================================

Learn something new every day.  I had no idea EasyBCD had that problem.

Based on your description of problem, I'm going to make a purely speculative guess at a possible solution.  Here's my thought process.

From the sounds of it, if you choose to boot Linux, EasyBCD passes booting responsibility to grub which then boots the distro.  If more than one distro uses grub2, it only recognizes and lists one of them for booting.  If the distro's grub that takes over has been updated to include boot choices for other installed distros, they will then show on the grub menu and can boot from there.  (That is my speculation.  I don't know that to be true.)

I'm guessing that when you choose Mint from EasyBCD menu, it either boots straight into Mint, or shows grub menu with only Mint choices for booting and no choices to boot LL.  I say that because I'm guessing you never went into Mint and updated grub to include LL because you knew ahead of time that LL would not boot properly that way.

So, here's my theory:  You're going to want to have LL's grub be the one referred to by EasyBCD and you should also be able to boot Mint from LL's grub menu.

Boot into Mint and delete grub packages so it's no longer installed there.  (Use "Quick Search" box in Synaptic Package Manager to search for "grub" and "Mark for complete removal" any grub packages that show as being installed.)  Then reboot into Windows and remove the Mint entry from EasyBCD.  Then tell EasyBCD to look for distros to boot again and it should only find the grub for LL.  Add that to EasyBCD, then reboot and see if you can boot into LL.

Also, since you installed LL after Mint, I'm guessing that LL's grub will already have a boot choice listed for Mint (and Windows too for that matter).  Boot into LL first to see if it works.  Then reboot and try to boot into Mint.  With any luck, I'm guessing this will all work.

If you can boot into LL but there is no choice showing to boot Mint, just open a terminal in LL and enter this command to add it to the grub boot menu:
Code: [Select]
sudo update-grub
Next reboot should now have Mint listed and I'm guessing that it will work.
« Last Edit: January 12, 2016, 09:08:44 PM by gold_finger »
Try Linux Beginner Search Engine for answers to Linux questions.
 

 

br1anstorm

  • Occasional Poster
  • **
  • 72
    Posts
  • Reputation: 4
  • Linux Lite Member
    • View Profile
Once again (and this is becoming a regular refrain...) thanks, gold_finger, for answering my puzzlement about using the terminal as user and/or as root.

In an earlier dalliance with PCLinuxOS, I do recall having to have separate user and root accounts, and having to figure out the difference between # and $. 

This particular explanation was as clear and comprehensible as I could have wished - no need to look onward to the howtogeek:

Quote
"Some Linux distros have you set-up a separate root user account to do admin activities in.  Others like LL (and all Ubuntu-based distros) don't do that.  Instead they have the main user (the one you set-up during installation) set-up to conduct admin activities as needed, on a per command basis using "sudo" at the beginning of the command.  Then it asks for your password as confirmation that you really want to run the admin command.  (If you don't close the terminal, it will remember the password for 10-15 minutes so you don't have to enter it each time when running a series of admin commands.  When you close the terminal, the password is cleared and you'll need to enter it again if you decide to open terminal again and run more sudo commands.)"


So....... back to the main story, which is about trying to set up a multiboot on a Win7 laptop.  My aim was to have both Linux Mint and Linux Lite installed, with a shared DATA partition, and both accessible via EasyBCD thus keeping the Win7 bootloader in place.

The first distro I installed was Linux Mint..... and I have successfully managed to do both the "chown" and the symlinks to create shared folders in the DATA partition linked to my 'home' folder.  Again, kudos to gold-finger, and no cause for embarrassment or laughter:  the command-line method worked like a charm.

Flushed with success, I then installed Linux Lite, and its Grub, on the next pre-prepared empty partition.  All went well.  I managed to add it into the EasyBCD menu as my third OS option along with Win7 or Mint.  BUT......

I then found that although EasyBCD listed both Linux OSs, selecting Linux Lite took me only to the Grub2 bootloader screen offering Linux Mint (or Win7).  No sign of Linux Lite...

I have now discovered that there is a limitation with EasyBCD (which its provider acknowledges).  EasyBCD cannot - yet - handle or boot into more than one OS which uses GRUB2 . It can multiboot different versions of Windows.  It can multiboot versions of Windows, and Linux distros which use Grub Legacy.  But it can only "see" one instance of Grub2.   Hence it is unable to boot into the Linux Lite I have installed, because I already have Mint, and its Grub2, in place. 

This is an issue with EasyBCD and nothing to do with Linux Lite. I only post up this information in case it is of use or interest to others.  I am surely not the only person who likes the idea of retaining Windows and its MBR and also having several Linux distros to choose from?

So for the moment I have paused.  I suppose I could just bin EasyBCD and do what most people do for a dual or multiboot:  install a Linux distro and allow its Grub2 to replace the Windows bootloader in the MBR, and then install as many Linux distros as I want, updating the initial Grub2 to enable booting into any of the others.  I know already that if I go down this route, I would have to start by installing LL (because its Grub2 has been tweaked and needs to remain the "lead" bootloader) and then add other distros and do the "update-grub".

This means losing the Windows bootloader (though I have taken the sensible advice to make a backup).  I suppose the other - possible? - way to do it, keeping Windows unscathed and still using EasyBCD, would be to somehow "insert" or add the Grub from the second Linux OS (Lite) into the boot menu of the first one (Mint).  I don't have the expertise to know how to do this, and fear it may be more complicated than I would want.

The learning curve continues!  If anyone feels inclined to comment, I'd be interested......

« Last Edit: January 12, 2016, 05:50:46 PM by br1anstorm »
 

 

gold_finger

  • Documentation Writer
  • Platinum Level Poster
  • *****
  • 1094
    Posts
  • Reputation: 325
  • Linux Lite Member
    • View Profile

  • CPU: Intel Core2 Duo E7500 3.0GHz

  • MEMORY: 4Gb

  • VIDEO CARD: Intel 4 Series Integrated Graphics
My first question is...... can I carry out the "chown" command simply as me?  Or do I have to go through some process to go into the terminal as "root" (ie like running as an Administrator in Windows).
To change ownership of a root owned folder to yourself you need to do so with root/administrator privileges.  Some Linux distros have you set-up a separate root user account to do admin activities in.  Others like LL (and all Ubuntu-based distros) don't do that.  Instead they have the main user (the one you set-up during installation) set-up to conduct admin activities as needed, on a per command basis using "sudo" at the beginning of the command.  Then it asks for your password as confirmation that you really want to run the admin command.  (If you don't close the terminal, it will remember the password for 10-15 minutes so you don't have to enter it each time when running a series of admin commands.  When you close the terminal, the password is cleared and you'll need to enter it again if you decide to open terminal again and run more sudo commands.)  Here's a link that might help explain a bit better:  http://www.howtogeek.com/111479/htg-explains-whats-the-difference-between-sudo-su/

Like I said before, if you use "Ext4" file system on that partition and use the same username on all distros you install, you'll only need to take ownership of that partition once.  The Ext4 file system retains the ownership info along with the files.  When/If you upgrade or replace distros, as long as you continue to use the same username you'll have immediate access to that data partition without having to mess with the chown command again.


So I went into the terminal and did "chown"using the command code provided.  I hit enter..... and then the terminal asked for my password! Not quite understanding why this request came up after I had done the "chown" command, I simply typed in "exit" and the terminal closed.

However, it does appear that the command worked - because the permission for the DATA folder now shows my username and me as the owner.

Based on above I can't be sure exactly why it worked, but if it now shows you as owner we'll leave it at that.


when using commands in the terminal, is there any password/login process that determines whether I am in the terminal just as me, the user, or as root?  Or does it make no difference?

Every time you open the terminal it will be as you.  (Exception:  sometimes there may be a right-click choice shown to open a terminal as root, when in file manager for example.)   Also, the prompt you'll see right before the cursor will have a "#" at the end when you're running as a normal user.  You could use the "su" command to switch to running as root during entire terminal session, but it's safer to stick to using the "sudo" command on an as needed basis instead of running as root.  (If you were to run a terminal as root, you'd see a "$" at end of prompt instead of the "#" sign, which is another way to tell you're running as root.  Open a terminal and run "su", enter password, and you'll see the prompt change.  Then type "exit" to get out of root terminal.)


Finally, and just to be clear:  what exactly is the sequence for creating the symlinks?  Do I (i) delete the Docs/Pics/Downloads/Music folders in my Home area first, and then (ii) create folders with those names in the DATA folder, and then (iii) run the command(s) as explained already?

Once you've taken ownership, you can create folders in and copy files to the data partition any time you like.  Timing wise, the only thing you need to make sure of is that you delete any folders in Home that have the same name as a folder you plan to symlink in /mnt/DATA.  If you didn't do that then the symlink attempt would fail because it would be trying to create something with the same name as one that already exists.  If you've got no files stored in those Home folders, then you can just delete them right away.  If you do, and they are files you want to save, then make sure you copy them over to the data partition first, otherwise they'll be gone when you delete the folders.

Eg.  I've got a data partition on computer that I've used for a few years.  Periodically I change distros installed to the computer and/or install updated versions.  When I do that I immediately delete the standard Home folders (except Desktop) and create symlinks to the data partition where all my files are.  Nothing needs to be done on data partition because everything is already there and I always use the same username.  So in about 1-2 minutes my files are back to same setup I had before.


I know to leave the Desktop folder in Home untouched.  What about the folders labelled "Public" and "Templates"?  Leave them alone, or have them too set up (and symlinked) in the DATA area?
If those are folders you use, yes put them on the data partition too.  I personally don't use either of them, so I just delete them and don't have them anywhere.

In addition to standard folders like "Documents, Music, Pictures", etc., you can create folders of any name you wish on the data partition and symlink them to home also.  I have 4-5 others symlinked in addition to standard named folders.  You can set it up any way you want really.


I'm game to do it using the terminal.... but I did notice that if you right-click on a folder in either Home or in the DATA partition, then one of the drop-down options is "Create a link".  I guess this is the GUI alternative?  It seems to be the equivalent to a shortcut in Windows, but I can't see how you specify the path, or destination, for whatever link you are creating.  Seems simpler to stick with the command line formula suggested earlier!

Ok, this is embarrassing, but I'm sure you'll get a laugh out of this (along with everyone else). :-[   I've been using Linux for about 6 years now.  In that time I've tried a few times to figure out how to do symlinks with the GUI, but never succeeded.  I knew how to do it in the terminal, so I didn't bother spending time looking up how to do it -- but the point is I still can't do it now.  Someone else will need to explain that and I'm sure it will be something ridiculously easy and I'll feel like a complete moron for not figuring it out.
Try Linux Beginner Search Engine for answers to Linux questions.
 

 

br1anstorm

  • Occasional Poster
  • **
  • 72
    Posts
  • Reputation: 4
  • Linux Lite Member
    • View Profile
It's a little while since this earlier conversation took place, and other things have distracted me from setting up this dual/multi-boot arrangement.

But I have just about cracked it.  One minor hiccup, in that during the install process I "forgot" to set up and mount the shared Data partition. But I was able to go back and sort that out.  I kept it as Ext4 and plan to use it only with the Linux distros.  As suggested, it is at  /mnt/DATA.

So I now have my first Linux OS all set up, with its grub in the same partition as its / (root) , and I have successfully configured the boot arrangements using EasyBCD, and it all works!

All that remains is (a) to make sure I have taken ownership of the DATA partition, and then (b) to create, organise and symlink the folders.  This advice from gold_finger earlier was pretty clear, but I have a couple of queries, mainly because of my unfamiliarity with working with terminal commands....

.....
4.  Setup DATA partition for use with all operating systems.
  • If you did not set DATA partition during install, follow this tutorial to do it after install.
  • In the Linux distros, ownership of the mount point will probably be set to Root initially.  You'll need to change that so your user is the owner.  Open a terminal and enter this command to take ownership of the mount point.  (Substitute your real username in place of "username" in the command.  And change "/mnt/DATA" to your mount point if that is not what you used.)
Code: [Select]
sudo chown -R username: /mnt/DATA
  • Open file manager and navigate to the data partition.  (You can do this in any Linux distro, or from Windows.)
  • Create the folders you want to use for data files.  Eg. Documents, Downloads, Music, etc.
  • Create symlinks from the DATA partition folders to your Home in each Linux distro.  You'll need to boot into each distro one-by-one and perform same basic steps:
  • Navigate to Home folder and delete all current folders except the "Desktop" folder.
  • Create symlinks from the DATA partition folders to your Home.  (Embarrassed to say that I don't know how to use GUI method for this, so can only give you command line method.)  Open a terminal.  You can enter a separate command for each folder that you want to link to Home using format like this:
Code: [Select]
ln -s /mnt/DATA/Documents /home/username
  • Or, you can create all of the symlinks at once with a command like this:
Code: [Select]
ln -s /mnt/DATA/{Documents,Downloads,Music,Pictures,Videos} /home/username
  • Just make sure that the folder names in the command are spelled out exactly as you made them on the DATA partition.
  • When you're done with symlinks, you will now see those folders when you open your Home in the file manager and when you save things to them the data will end up on the DATA partition and be useable by all operation systems.

My first question is...... can I carry out the "chown" command simply as me?  Or do I have to go through some process to go into the terminal as "root" (ie like running as an Administrator in Windows).

I was able to navigate to the shared DATA partition via the file manager.  It already has one folder in it called "lost+found" (presumably a default) .  I checked the properties>permissions and this suggested that Root was indeed the owner.  So I went into the terminal and did "chown"using the command code provided.  I hit enter..... and then the terminal asked for my password! Not quite understanding why this request came up after I had done the "chown" command, I simply typed in "exit" and the terminal closed.

However, it does appear that the command worked - because the permission for the DATA folder now shows my username and me as the owner. 

But I still have more work to do in the terminal, to set up the symlinks once I have created the new Docs/Pics/etc folders in the shared DATA partition.  So this query is mainly to ask:  when using commands in the terminal, is there any password/login process that determines whether I am in the terminal just as me, the user, or as root?  Or does it make no difference?

Finally, and just to be clear:  what exactly is the sequence for creating the symlinks?  Do I (i) delete the Docs/Pics/Downloads/Music folders in my Home area first, and then (ii) create folders with those names in the DATA folder, and then (iii) run the command(s) as explained already?  Or do I create the new folders first in DATA, and then delete the equivalent ones in my Home area, then run the command(s)?  Does it matter which way round I do the deletion/creation of folders?

I know to leave the Desktop folder in Home untouched.  What about the folders labelled "Public" and "Templates"?  Leave them alone, or have them too set up (and symlinked) in the DATA area?

I'm game to do it using the terminal.... but I did notice that if you right-click on a folder in either Home or in the DATA partition, then one of the drop-down options is "Create a link".  I guess this is the GUI alternative?  It seems to be the equivalent to a shortcut in Windows, but I can't see how you specify the path, or destination, for whatever link you are creating.  Seems simpler to stick with the command line formula suggested earlier!

Anyway, we're almost there.  Just need a bit of reassurance/clarification about using the terminal and whether/when it needs a password;  and then which folders to set up and which to leave alone...
 

Re: [SOLVED] Dual-boot or multi-boot of Linux Lite (and others) with Windows 7
« Reply #6 on: December 28, 2015, 08:52:36 AM »
 

gold_finger

  • Documentation Writer
  • Platinum Level Poster
  • *****
  • 1094
    Posts
  • Reputation: 325
  • Linux Lite Member
    • View Profile

  • CPU: Intel Core2 Duo E7500 3.0GHz

  • MEMORY: 4Gb

  • VIDEO CARD: Intel 4 Series Integrated Graphics
When you don't create a separate partition for /home, then /home is just another folder under the main Root partition.  So "yes", your user config files will be stored there (in home under root).

The "fstab" file located under the "/etc" directory/(folder) in each distro is the file that tells the system which partitions to mount on boot.  If you open that file with a text editor (leafpad in LL) and look at it, you'll see that there are line entries to mount the Root and Swap partitions.  When using a data partition, you will want that partition to be auto-mounted on boot also.  So you just create an entry in the fstab file for that partition.  That entry specifies the partition UUID, the mount point for it (eg. /mnt/DATA), file system type (eg. NTFS, or Ext4), etc.  A "mount point" is just a term meaning the location within the file system that you want the partition located.  If you use "/mnt/DATA", that means if you opened your file manager you could navigate to the location by going to Root ("/"), then to the "/mnt" directory and "DATA" will be listed under there.

If you enter a mount point for the data partition during installation, the fstab entry for that partition will automatically be made for you.  If you don't, then you will need to add the entry manually after installation.  That's easy to do and the entry will be exactly the same in each of the installed distros.

Assuming you create all partitions ahead of time with GParted, when you start the installation choose "Something else" option for LL and Mint.  (Other distros may word install options differently.  Equivalent to "Something else" in LL and Mint for others is any option that allows you to manually designate partitions yourself.)  You'll be brought to a partition selection page.  This is where you set the mount points for partitions to be used by the installer.  Assuming you don't make separate home partitions, you'll only need to designate a partition for Root and the data partition.  (Usually Swap is automatically recognized and used by distro installers, so you don't need to specify anything for it.  If one of your distros wants you to select and format it, go right ahead and do that.  It won't cause any issues for other distros that did not have you do that.)

NOTE:  Before continuing, just a side note.  Since you're starting fresh right now with partitions you just created, formatted and labeled in GParted, you will not need to check the box to "Format" the partitions you select during install.  (You already formatted them in GParted.)  It won't hurt anything to check the format box, but doing so will wipe-out the label you made for the partition in GParted.  Labels for partitions just make it easier for you to identify which partitions are which when you later list them all out or look at them with a program like GParted.  Without labels, you just see a bunch of partitions identified by long UUID numbers.  When you leave the "Format" box unchecked, installer will issue a warning that you forgot to format -- just ignore that and continue.  (If you were doing a re-installation over an existing one on a partition, then you would need to check the format box.)

For each distro you install, on the partition selection page choose the Root partition you made for it, then hit the "Change" button.  That pops-up a box where you set the particulars for the partition.
  • Use as = Ext4 file system
  • Size = leave as you already made it in GParted
  • Mount point = "/" for the Root partition
  • No need to "Format" it this time.
Do same thing for the data partition:
  • Use as = either "Ext4" if only going to use with Linux distros, or "NTFS" if using for Windows and Linux.
  • Size = leave as you already have it.
  • Mount point = "/mnt/DATA" (or another of your choosing if you want it somewhere else)
  • DO NOT format this partition -- that will wipe out any data on the partition.  Main purpose here is just to tell the system where to mount the partition and to mount it at boot time.  As long as you never choose to format the partition, all existing data on it will remain in tact and be accessible to the system at the location you designate as the mount point.
Continue on to finish installation after setting those mount points.


I think you should just go ahead an install LL or Mint right now.  Set the mount point for the data partition during installation so you don't need to manually add an fstab entry.  The drop-down box for mount points will not have a choice that shows "/mnt/DATA", so you simply type it into the box yourself (without the quote marks).


Boot into Windows and run EasyBCD to add the boot choice.  Reboot into your LL or Mint install.  Open file manager and go to "/mnt/DATA".  If you try to create and save a folder called "Documents", it likely won't let you because the partition is probably owned by root.  So just open a terminal and enter this command to change ownership to your username (substitute your real username where I have "username"):
Code: [Select]
sudo chown -R username: /mnt/DATANow, go ahead and try creating a "Documents" folder there.  It should now work.
Incidentally, if you decide to use "Ext4" filesystem on that data partition, then you will only need to take ownership of it once.  The permissions stick with the filesystem and as long as you use the same username on all distros you won't need to take ownership again on each one of them.
Try Linux Beginner Search Engine for answers to Linux questions.
 

Re: [SOLVED] Dual-boot or multi-boot of Linux Lite (and others) with Windows 7
« Reply #5 on: December 28, 2015, 07:33:09 AM »
 

br1anstorm

  • Occasional Poster
  • **
  • 72
    Posts
  • Reputation: 4
  • Linux Lite Member
    • View Profile
Thanks for that......

I've been symlinking /data to /home directories for some time.

editing /etc/fstab is required for that to work correctly.
Which makes things more complicated.
I don't mess with that on my Windows Laptop.
Because my Windows Laptop is my Biker Tuner laptop.

Just giving you info on what to expect. The more you want. The more steps and complicated things get.

I'm thinking that I might just make a shared DATA partition for the (three...) Linux distros I plan to install and leave Windows out of it.  That would mean I could format the DATA partition as Ext4 rather than NTFS.  It would also save me the complication of figuring out how to "symlink" between the DATA folders and the folders in Windows "My Docs/Pics/Music...".

Editing /etc/fstab is another matter.  Is this an alternative way of setting up symlinks, or a necessary extra step which gold_finger didn't mention?
 

Re: [SOLVED] Dual-boot or multi-boot of Linux Lite (and others) with Windows 7
« Reply #4 on: December 27, 2015, 06:28:56 PM »
 

rokytnji

  • Friganeer
  • Platinum Level Poster
  • **********
  • 1255
    Posts
  • Reputation: 139
    • View Profile

  • CPU: Intel Core2 Duo U9600

  • MEMORY: 4Gb

  • VIDEO CARD: Intel Mobile 4
I've been symlinking /data to /home directories for some time.

editing /etc/fstab is required for that to work correctly.
Which makes things more complicated.
I don't mess with that on my Windows Laptop.
Because my Windows Laptop is my Biker Tuner laptop.

Just giving you info on what to expect. The more you want. The more steps and complicated things get.
LL 3.6,2.8
Dell XT2 > Touchscreen Laptop
Dell 755 > Desktop
Acer 150 > Desktop
I am who I am. Your approval is not needed.
 

Re: [SOLVED] Dual-boot or multi-boot of Linux Lite (and others) with Windows 7
« Reply #3 on: December 27, 2015, 05:58:21 PM »
 

br1anstorm

  • Occasional Poster
  • **
  • 72
    Posts
  • Reputation: 4
  • Linux Lite Member
    • View Profile
That response, gold_finger is - as usual - pure GOLD!

Thank you so much for that clear, precise and logical step-by-step guidance.  It is so helpful when the process is set out in such a systematic way.

Good advice to create a separate back-up/recovery disk.  I have both the Samsung recovery program and the Win7 backup/repair utility, so might play safe and do one of each!

Although I understand the arguments for turning over the whole bootloading process to LL's Grub, I think I will probably rely on EasyBCD, keep the Windows bootloader and put each Linux distro's Grub on the relevant /root partition.  As I understand it, once the various distros are installed in this way and listed in Easy BCD, then EasyBCD just "points" to the Grub of whichever distro you opt to boot into.  In other words, if using EasyBCD there's no need to "sudo update" any of the Grubs belonging to any individual distro,  as each is in its own partition and only responsible for booting its own distro when told to do so by EasyBCD!   

One particular point of detail.  You say it's hardly worth creating /home partitions when installing each distro because there will be a DATA partition wherein to store all the docs etc.  Then a bit later on you say "Create symlinks from the DATA partition folders to your Home in each Linux distro.  You'll need to boot into each distro one-by-one and perform same basic steps......Navigate to Home folder and delete all current folders except the "Desktop" folder......Create symlinks from the DATA partition folders to your Home."  Now this might seem a really dumb question from a newbie - but am I right to think that if I only have a /(root) partition for each distro (and no separate /home), then I will instead have a "Home" within the /(root) of each distro (inside which are pre-prepared and empty Docs/Pics/Music/Video folders)?  And once I have deleted these ones, I then go into the DATA partition, via each distro in turn, and do the "symlinking" using the terminal commands you provide?

I don't want to digress or complicate matters:  but am I right to think that one argument for making a /home partition (even if only small) for each distro is that certain stuff ("configurations", and "profiles" - which are particular to each distro?) can and do then remain there, even if you store all the docs, music, etc in the folders in the DATA partition?  Or does that sort of stuff just as easily stay in the residual "Home" area in the /(root) of each distro if you don't have separate /home partitions?

One other area where I'm still not wholly sure I have grasped the details is the business of choosing/labelling the mount point for the DATA partition and then sorting out or changing its ownership and creating symlinks.  But you have given me more than enough information and encouragement to "give it a go", so I will get started on the backing up and (re)partitioning and installing, and see how far I get.

Huge thanks for your advice:  I guess a lot of it is about having enough of an understanding to act with confidence, rather than groping around trying things in the semi-dark without really knowing why!
 

 

-->
X Close Ad

Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section