Linux Lite Forums
How do I reinstall LL safely in a win7/zorin/lubuntu/LL multiboot? - Printable Version

+- Linux Lite Forums (https://www.linuxliteos.com/forums)
+-- Forum: Software - Support (https://www.linuxliteos.com/forums/forumdisplay.php?fid=5)
+--- Forum: Installing Linux Lite (https://www.linuxliteos.com/forums/forumdisplay.php?fid=17)
+--- Thread: How do I reinstall LL safely in a win7/zorin/lubuntu/LL multiboot? (/showthread.php?tid=3303)

Pages: 1 2


How do I reinstall LL safely in a win7/zorin/lubuntu/LL multiboot? - m654321 - 09-10-2016

My young son expressed a wish to have Lubuntu14.04 & LL2.8 added to his win7/zorin9 dual-boot [see setup (3) in signature below], which I've now done. However, I need to delete & reinstall the LL partitions on this multiboot system.

The situation doesn't seem (at least to me)  to be as straightforward as a win7/LL dual boot. With win7/LL I would use the win7 repair disk and enter the commands bootrec /fixboot  and then bootrec /fixmbr in the command prompt (X:\Sources>), following deletion of LL using gparted. After that, LL (or another OS) can either be safely added to win7 or win7 simply left as a single-boot system.  However, I don't think I can do that here as I have more than one distro booted with win7.

As I wish to remove & reinstall  LL2.8 in a win7/zorin9/lubuntu14.04/LL2.8 setup, can I merely delete LL in gparted and then simply reinstall it.  As I'm replacing like-with-like, I'm assuming the grublist or win7 bootloader wont get messed up - is this assumption correct or is there another method to do this?

Thanks for any help on this one.
Mike


Re: How do I reinstall LL safely in a win7/zorin/lubuntu/LL multiboot? - gold_finger - 09-10-2016

Is the only reason you're re-installing LL 2.8 because you added that to the setup first, then added Lubuntu and now can't boot into LL 2.8 because grub menu item for it does not work?

If so, all you need to do is use live LL 2.8 dvd/usb to re-install grub from LL on disk to the MBR of the drive putting LL back in control of booting.  To do that follow these steps.  (NOTE:  I'm putting all instructions within code blocks -- just because I'm lazy.  Every line that begins with a "#" is just a comment line describing the command that follows it.  Only enter the commands into your terminal, not the comment lines.  Also, I'm assuming that you are not using a separate /boot partition on the drive.)

Code:
# Use the blkid command to list your partitions.  Make note of the LL 2.8 root partition device name.
sudo blkid -c /dev/null

# In examples below, X is the drive letter (a, b, c, etc.); Y is the partition number (1, 2, 3, etc.).
# Mount your LL 2.8 root partition to /mnt
sudo mount /dev/sdXY /mnt

# Run following command to install grub.
sudo grub-install --boot-directory=/mnt/boot /dev/sdX

# Unmount your LL 2.8 root partition.
sudo umount /dev/sdXY

# Close terminal and reboot computer.

# If all OS's don't show up in menu on reboot, boot into system then run this command to add them to menu:
sudo update-grub

# Done.


If fixing grub booting was not the problem and you really do need to re-install, you do not need to use GParted to delete the current LL partition first.  Just boot your live LL 2.8 dvd/usb, start the installer, pick the "Something else" install option.  That will bring you to the partition selection page where you can designate which partition to use for the install.  Just highlight the current LL root partition, click "Change" button.  In pop-up box:
  • Use as = Ext4 file system
  • Size = leave as is
  • Mount Point = /
  • Format = check box to format
  • Click "Done".  (If you get a message complaining that you changed the size of the partition -- even though you did not -- ignore it and click "Go Back" button.  All will be fine.)
No need to do anything with Swap partition -- it will get used automatically.


Near bottom of window, "Device for boot loader installation" should be set to "/dev/sda", assuming the drive being booted from is sda.


Click "Finish" button to complete the installation.  It will now re-format the old LL root partition and re-install to same place.  LL's grub will be in charge of booting all of the OSes, which is what you want.  (Having any other distro's grub in charge will result in failure to boot LL.)


If computer boots straight into LL without showing grub menu with other OS choices, open a terminal in LL and enter this command:
Code:
sudo update-grub


On next reboot all choices should show-up.


P.s.  If you're not sure which partition the current install of LL is on, just boot into it then enter this command in a terminal:
Code:
lsblk


Look to see which partition has the "/" (root) mount point listed next to it -- that's the partition you want to re-install to.



Re: How do I reinstall LL safely in a win7/zorin/lubuntu/LL multiboot? - m654321 - 09-10-2016

Many thanks goldfinger - I'm now marking this post as solved Smile
The second scenario that you outlined was the one I had - I applied your solution & it worked.
You're a Champion!

Mike


Re: How do I reinstall LL safely in a win7/zorin/lubuntu/LL multiboot? - gold_finger - 09-11-2016

Glad everything worked out.  Hope your son enjoys LL.


Re: How do I reinstall LL safely in a win7/zorin/lubuntu/LL multiboot? - m654321 - 09-17-2016

I've installed a standard user account for my son, alongside my admin account, on LL2.8 & zorin9 in the win7/zorin/lubuntu/LL multiboot. Win7 already has the usual standard user & admin accounts setup.

Though setting up the standard user accounts was straightforward for LL & zorin, I'm unable to figure out how to do this for lubuntu.

Unless someone on the forum can advise on this, I would like to permanently delete lubuntu OS from the multiboot.  Should I do this is gparted and then run sudo update-grub (as I did when I reinstalled LL to the multiboot)?  As win7 has the bootloader, should I also run bootrec /fixboot and bootrec /fixmbr in the win7's command prompt (using the win7 repair disk), or do I risk inadvertently wiping LL & zorin from the PC along with lubuntu?

Many thanks again for any help on this.
Mike

PS. @gold_finger - yes, he seems to be really enjoying LL so far Smile


Re: How do I reinstall LL safely in a win7/zorin/lubuntu/LL multiboot? - gold_finger - 09-17-2016

Yes, if you decide to do away with Lubuntu, you can use Gparted to do that.  Can do that from either the LL install or live dvd/usb.  After it's deleted, just run sudo update-grub in a terminal in LL to eliminate its entry from grub menu.  No need to do anything in Windows.


I'm not familiar with Lubuntu so can't give gui instructions to add user; but can probably give terminal command if you post the output of following from terminals in both LL and Lubuntu.


Login to LL on son's computer under his username.


Open a terminal, enter these commands and copy/paste result back here:
Code:
id
groups


Shutdown, reboot into Lubuntu.  Login under your username if you haven't set anything at all for him yet.  Login with his username if you have set already, but don't have him added to all necessary groups.


If logged in as yourself, paste back result of this:
Code:
groups


If logged in as him, paste back:
Code:
id
groups


When you post back, don't forget to tell us which results go with LL vs. Lubuntu.  Basically, the plan is to setup his user account on Lubuntu with the same privileges you assigned to him on LL.


Re: How do I reinstall LL safely in a win7/zorin/lubuntu/LL multiboot? - m654321 - 09-21-2016

(09-17-2016, 09:56 AM)gold_finger link Wrote: Yes, if you decide to do away with Lubuntu, you can use Gparted to do that.  Can do that from either the LL install or live dvd/usb.  After it's deleted, just run sudo update-grub in a terminal in LL to eliminate its entry from grub menu.  No need to do anything in Windows.

I'm not familiar with Lubuntu so can't give gui instructions to add user; but can probably give terminal command if you post the output of following from terminals in both LL and Lubuntu.

Login to LL on son's computer under his username.

Open a terminal, enter these commands and copy/paste result back here:
Code:
id
groups

Shutdown, reboot into Lubuntu.  Login under your username if you haven't set anything at all for him yet.  Login with his username if you have set already, but don't have him added to all necessary groups.

If logged in as yourself, paste back result of this:
Code:
groups

If logged in as him, paste back:
Code:
id
groups

When you post back, don't forget to tell us which results go with LL vs. Lubuntu.  Basically, the plan is to setup his user account on Lubuntu with the same privileges you assigned to him on LL.
@gold_finger.
Output from terminal in LL, under son’s username:
Code:
SamTheEditor@happyfamily-X71Q:~$ id
uid=1001(SamTheEditor) gid=1001(SamTheEditor) groups=1001(SamTheEditor),4(adm),24(cdrom),30(dip),46(plugdev),100(users),109(lpadmin),110(sambashare)
SamTheEditor@happyfamily-X71Q:~$ groups
SamTheEditor adm cdrom dip plugdev users lpadmin sambashare
SamTheEditor@happyfamily-X71Q:~$

Output from terminal in Lubuntu, under my username (with nothing set up for him yet):
Code:
happyfamily@happyfamily-X71Q:~$ groups
happyfamily adm dialout fax cdrom floppy tape sudo dip video plugdev fuse lpadmin sambashare sam
happyfamily@happyfamily-X71Q:~$

Mike



Re: How do I reinstall LL safely in a win7/zorin/lubuntu/LL multiboot? - gold_finger - 09-21-2016

It's generally frowned upon to create usernames with capital letters -- they're supposed to be composed of lowercase letters, numbers, and I believe you can also have "-" and "_" characters also.  Honestly, I don't know if using capital letters in the username will eventually cause some kind of problem.  If someone else knows the answer to that please chime in here.


If your son hasn't already done a lot of customizing of the LL system, you may want to consider deleting the "SamTheEditor" user and creating a new one with "sam-the-editor" instead.  (Or "samtheeditor", "sam_the_editor", etc.)  (EDIT:  Please see trinidad's post below warning about potential problems with using caps in the username.  It would definitely be best to re-create your son's LL username to one with no caps.  Copy off anything he wants saved in his home folder, delete the "SamTheEditor" account and it's home folder/files, make new one with no caps, copy back saved data into new home.)



I'll give instructions using "SamTheEditor" because that is what you've already got setup in LL.


In Lubuntu, this will create the new user and his home folders (on his first login):
Code:
sudo adduser --force-badname SamTheEditor
You'll be prompted to enter a password for the user.  Then it will ask if you want to set other user info (eg. full name, phone #, etc.).  You can just hit <ENTER> at each of the info prompts to leave blank if you don't want to fill them in.


At this point, run following command to make sure his user(SamTheEditor) and group(SamTheEditor) show the UID and GID = 1001.  (It should if you were the only user account setup on that system.  Having same username, UID and GID as he's using on LL will ensure easier sharing of files between the two systems, especially if you've got a shared data partition to be used by both.)
Code:
id SamTheEditor


Assuming correct UID and GID of 1001 shows above, use this command to add him to the other groups (matching what you did in LL):
Code:
sudo usermod -a -G adm,cdrom,dip,plugdev,users,lpadmin,sambashare SamTheEditor
(NOTE:  there are no spaces in the comma-separated list of groups.)




P.s.  If you do decide to delete "SamTheEditor" from LL and replace with new username, use same commands listed above for Lubuntu but you can drop the "--force-badname" part of the first command.


Re: How do I reinstall LL safely in a win7/zorin/lubuntu/LL multiboot? - trinidad - 09-21-2016

Yes user names with capital letters will cause problems with certain packages. Spotify comes to mind at the moment. Some applications simply won't recognize the user name at all. Better not to, even though they will work and show up at login. Generally one capital letter at the beginning of name does not cause as many problems, but it's best (and more code efficient) to stay with lower case. Case sensitivity varies with some packages, especially cross platform things like Wine or Cygwin. Lower case is certainly best.

TC


Re: How do I reinstall LL safely in a win7/zorin/lubuntu/LL multiboot? - gold_finger - 09-21-2016

(09-21-2016, 04:01 PM)trinidad link Wrote: Yes user names with capital letters will cause problems with certain packages. Spotify comes to mind at the moment. Some applications simply won't recognize the user name at all. Better not to, even though they will work and show up at login. Generally one capital letter at the beginning of name does not cause as many problems, but it's best (and more code efficient) to stay with lower case. Case sensitivity varies with some packages, especially cross platform things like Wine or Cygwin. Lower case is certainly best.

TC
Thanks for above.


Incidentally,  I tested adding "SamTheEditor" user to a VBox of Mint as per method outlined above.  That worked fine, but when I tried to use Mint's gui "Users and Groups" program to delete that user it would not work.  It would have no problem deleting "sam-the-editor", but would not delete "SamTheEditor".  So, yes -- using caps will likely cause problems somewhere along the line.