"Upgrade" 32-bit to 64-bit

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
dEhiN

"Upgrade" 32-bit to 64-bit

Post by dEhiN »

So I just found out that my laptop (HP Elitebook 6930p) has a 64-bit enabled cpu. I assumed it was 32-bit when I first installed LM and used the 32-bit version. I would now like to put on the 64-bit edition of 17.3. Of course I know I can't just upgrade; I have to do a fresh install. But is there any way I can either save my various program configs, or maybe save a list of all the programs I have installed? I don't really want to config my system from the ground up. So not sure if LM has any sort of utility to save user state type information, like installed programs, config settings, etc.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
SOCRATE_MMXII

Re: "Upgrade" 32-bit to 64-bit

Post by SOCRATE_MMXII »

You can backup your "home" partition/directory where you installed your programs and restore it after a new installation, but it's not guaranteed that it will work.
dEhiN

Re: "Upgrade" 32-bit to 64-bit

Post by dEhiN »

SOCRATE_MMXII wrote:You can backup your "home" partition/directory where you installed your programs and restore it after a new installation, but it's not guaranteed that it will work.
Ok, thanks. Do you know of any way to have apt output a list of installed programs? Also, I have added some extra sources to apt's sources.list. Could I just copy /etc/apt/sources.list as well as the whole /etc/apt/sources.list.d/ directory?
User avatar
jimallyn
Level 19
Level 19
Posts: 9075
Joined: Thu Jun 05, 2014 7:34 pm
Location: Wenatchee, WA USA

Re: "Upgrade" 32-bit to 64-bit

Post by jimallyn »

dEhiN wrote:Do you know of any way to have apt output a list of installed programs?
The Backup Tool will do that. Not sure which desktop environment you are using, but in Cinnamon, click Menu, Administration, Backup Tool, Backup software selection.
“If the government were coming for your TVs and cars, then you'd be upset. But, as it is, they're only coming for your sons.” - Daniel Berrigan
dEhiN

Re: "Upgrade" 32-bit to 64-bit

Post by dEhiN »

jimallyn wrote:
dEhiN wrote:Do you know of any way to have apt output a list of installed programs?
The Backup Tool will do that. Not sure which desktop environment you are using, but in Cinnamon, click Menu, Administration, Backup Tool, Backup software selection.
Beautiful! Thank you! (I'm using MATE, but just did a search for Backup Tool)
User avatar
jimallyn
Level 19
Level 19
Posts: 9075
Joined: Thu Jun 05, 2014 7:34 pm
Location: Wenatchee, WA USA

Re: "Upgrade" 32-bit to 64-bit

Post by jimallyn »

One potential problem I see is that the list of software you'll generate is of course all 32 bit stuff, and you will want the 64 bit stuff after installing the 64 bit OS. I don't know if the system is smart enough to handle that or not.
“If the government were coming for your TVs and cars, then you'd be upset. But, as it is, they're only coming for your sons.” - Daniel Berrigan
dEhiN

Re: "Upgrade" 32-bit to 64-bit

Post by dEhiN »

jimallyn wrote:One potential problem I see is that the list of software you'll generate is of course all 32 bit stuff, and you will want the 64 bit stuff after installing the 64 bit OS. I don't know if the system is smart enough to handle that or not.
Yeah I realized that as well. I have enough experience to watch what it's doing and not just blindly run it, so hopefully I'll be ok. If not, I'll Google around, or post here.
ricardo06
Level 1
Level 1
Posts: 16
Joined: Tue Dec 11, 2012 8:19 am

Re: "Upgrade" 32-bit to 64-bit

Post by ricardo06 »

Hello,
I was curious to know if you got it done.
I am myself interested in such an upgrade may be you can share your experience ?
Many thanks
Richard
User avatar
austin.texas
Level 20
Level 20
Posts: 12003
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: "Upgrade" 32-bit to 64-bit

Post by austin.texas »

jimallyn wrote:One potential problem I see is that the list of software you'll generate is of course all 32 bit stuff, and you will want the 64 bit stuff after installing the 64 bit OS. I don't know if the system is smart enough to handle that or not.
This is exactly right.
You can get a nice list of the installed programs with short descriptions (for reference), with the command:

Code: Select all

dpkg -l | grep ii >> installed-programs.list

You can look through that list to determine the actual names of the programs you want to re-install.
Then install with the command

Code: Select all

sudo apt-get install program1 program2 program3 program4
I will post my backup script, and the update script so that you can see how to backup and restore your PPA's. Of course, you can only use my scripts as a guide, because they are customized for my system.
Backup script:

Code: Select all

#!/bin/sh
# You will need a backup drive with at least 1GB available.
# Boot into the OS that you want to back up.
# make a folder on your backup drive "backupscript"
# save this file in the backupscript folder, as backup.sh
# right-click on the backupscript folder & open a terminal
# make the script executable with "sudo chmod u+x backup.sh"
# run the script with "sudo ./backup.sh"

# clean out unneeded .deb files:
aptitude autoclean
# copy all remaining .deb files - 
# this eliminates excessive downloading when installing your programs
mkdir archives
cp /var/cache/apt/archives/*.deb ./archives/

# copy the software sources so that the PPA's can be restored
cp -a /etc/apt .

# backup all repository keys - optional. Use only when cloning the same version !
# apt-key exportall > repo.keys

# I have customized grub config files that I want to preserve:
cp /etc/default/grub .
cp /etc/grub.d/40_custom .
cp /etc/grub.d/06_mint_theme .

# copy personal configuration and program configs
# if you use Firefox or Thunderbird you will want to add those to this list
# any programs you don't use can be deleted from this list
cp -a $HOME/.avidemux .
cp -a $HOME/.gconf .
# I have my chosen program launchers in .config/autostart
cp -a $HOME/.config/autostart .
cp -a $HOME/.config/Pinta .
cp -a $HOME/.config/roxterm.sourceforge.net .
cp -a $HOME/.config/smplayer .
cp -a $HOME/.config/vlc .
cp -a $HOME/.config/clipit .
cp -a $HOME/.filezilla .
cp -a $HOME/.grsync .
cp -a $HOME/.icons .
cp -a $HOME/.local .
cp -a $HOME/.multisystem .
cp -a $HOME/.puddletag .
cp -a $HOME/.themes .
cp -a $HOME/.wallpapers .
# preserve my clock display config
cp -a $HOME/.cinnamon/configs/clock@cinnamon.org .
cp -a $HOME/.mozilla/seamonkey .
cp -a $HOME/.asunder* .
cp -a $HOME/.bash_history .
# preserve my custom aliases in bashrc
cp -a $HOME/.bashrc .
cp -a $HOME/.face .
cp -a $HOME/.gimp-2.8 .
cp -a $HOME/.config/google-chrome .
cp -a $HOME/bin .

# remove Firefox and Thunderbird
# I don't use them, and don't want frequent updates
apt-get --purge autoremove -y firefox  firefox-locale-en
apt-get --purge autoremove -y thunderbird  thunderbird-gnome-support

# save installed software list
# WARNING "dpkg set-selections" should be used ONLY when migrating to the SAME version and desktop !!!
# otherwise you will trash the new system - at least that is my experience...
# See https://forums.linuxmint.com/viewtopic.php?f=47&t=169573#p872138
# as to why "dpkg set-selections" is probably not a good idea for Mint at all
# for one thing it will list all the installed kernels, and possibly obsolete library files
# It is better to manually maintain a list of the programs you want to install.
dpkg --get-selections > installed-software.list

# If you want to use "dpkg set-selections" to restore the listed programs, 
# you need to edit the installed-software.list file to delete all lib* and linux* references. 
# You don't want to install obsolete libraries or kernels. 
# In fact, delete all programs you don't recognize.
# You can get a nice list of the installed programs with short descriptions (for reference), with the command: 
# dpkg -l | grep ii >> installed-programs.list

# backup the entire Cinnamon dconf
# includes the menu favorites, panel location, hot corners, etc.
dconf dump /org/cinnamon/ > dconf.org.cinnamon

# backup the entire Nemo dconf
# preserves columns, views, and Desktop
dconf dump /org/nemo/ > dconf.org.nemo

echo DONE !
Update script:

Code: Select all

#!/bin/sh
# save this file in the backupscript folder as update.sh
# make it executable with "sudo chmod u+x update.sh"
# boot into the newly installed OS
# establish wireless or cable internet connection
# Check Software Sources for fastest connection 
# right-click on the backupscript folder & open a terminal
# run the script with "sudo ./update.sh"

echo Did you check Software Sources for the fastest connection?
while true
do
  echo -n "Enter y(es) to continue or n(o) to abort:"
  read CONFIRM
  case $CONFIRM in
    y|Y|YES|yes|Yes) break ;;
    n|N|no|NO|No)
      echo Aborting - you entered $CONFIRM
      exit
      ;;
    *) echo Please enter only y or n
  esac
done
echo You entered $CONFIRM - continue...

echo Remove unused stuff e.g. firefox, thunderbird, and rare fonts
apt-get -y --purge autoremove firefox  firefox-locale-en
apt-get -y --purge autoremove thunderbird  thunderbird-gnome-support 
apt-get -y --purge autoremove fonts-kacst fonts-kacst-one fonts-khmeros-core fonts-lao fonts-lklug-sinhala fonts-nanum fonts-sil-abyssinica fonts-sil-padauk fonts-takao-pgothic fonts-tibetan-machine fonts-tlwg-garuda fonts-tlwg-kinnari fonts-tlwg-loma fonts-tlwg-mono fonts-nanum fonts-tlwg-norasi fonts-noto fonts-tlwg-purisa fonts-tlwg-sawasdee fonts-tlwg-typewriter fonts-tlwg-typist fonts-tlwg-typo fonts-tlwg-umpush fonts-tlwg-waree ttf-indic-fonts-core ttf-punjabi-fonts ttf-wqy-microhei fonts-droid fonts-wqy-zenhei 

# replace /etc/default/grub and /etc/grub.d/40_custom and /etc/grub.d/06_mint_theme with my customized versions
cp grub /etc/default/
cp 40_custom /etc/grub.d/
cp 06_mint_theme /etc/grub.d/

# Reduce swappiness from 60 to 15
echo "vm.swappiness=15" | sudo tee -a /etc/sysctl.conf

ufw enable

echo Get rid of the annoying Warning No support - en_US.utf8
locale-gen --purge --no-archive

# Restore all repository keys - optional. Use only when cloning the same version !
# apt-key add ./repo.keys

# install ubuntuzilla ppa (Seamonkey) and MultiSystem ppa (additional-repositories.list)
cp ./apt/sources.list.d/additional-repositories.list /etc/apt/sources.list.d/

echo Install ubuntuzilla ppa key
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C1289A29

echo Install MultiSystem ppa key
wget -q -O - http://liveusb.info/multisystem/depot/multisystem.asc | sudo apt-key add -

# copy Google Chrome ppa
cp ./apt/sources.list.d/google-chrome.list /etc/apt/sources.list.d/
echo Install Google Chrome key
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - 

echo Copying all old .deb files
cp ./archives/*.deb /var/cache/apt/archives/

apt-get -y update

echo Install all the programs I use:
apt-get -y install  acetoneiso album apport-gtk asunder avidemux avidemux-plugins-gtk bluefish boot-info-script clipit cthumb dconf-tools filezilla flegita-gimp fsarchiver gimp glines gnome-brave-icon-theme gnome-color-chooser gnome-search-tool google-chrome-stable gparted gpick grml-rescueboot grml2usb grsync grub-pc gsmartcontrol gtkhash gufw gwenrename hardinfo htop imagemagick-doc leafpad medit meld multisystem nemo-image-converter pinta pithos pmount preload puddletag roxterm seamonkey-mozilla-build shutter smartmontools smplayer smtube swapspace tuxpaint xsane

# alternative program installation commands:
# apt-get -y install $(cat installed-software.list | awk '{print $1}')
# The apt-get command works great. Better than dpkg/dselect.
# Enter the next 4 commands to use the dpkg/dselect method.
# apt-get install dselect
# dselect update
# dpkg --set-selections < installed-software.list
# apt-get dselect-upgrade -y

# clean out unused .deb files
aptitude autoclean

echo Restoring personal configuration 
cp -a .avidemux $HOME/
cp -a .gconf $HOME/
cp -a  autostart $HOME/.config/
cp -a  Pinta $HOME/.config/
cp -a  roxterm.sourceforge.net $HOME/.config/
cp -a  smplayer $HOME/.config/
cp -a  vlc $HOME/.config/
cp -a  clipit $HOME/.config/
cp -a .filezilla $HOME/
cp -a .grsync $HOME/
cp -a .icons $HOME/
cp -a .local $HOME/
cp -a .multisystem $HOME/
cp -a .puddletag $HOME/
cp -a .themes $HOME/
cp -a .wallpapers $HOME/
cp -a  google-chrome $HOME/.config/
cp -a  clock@cinnamon.org $HOME/.cinnamon/configs/
cp -a  seamonkey $HOME/.mozilla/
cp -a .asunder* $HOME/
cp -a .bash_history $HOME/
cp -a .gimp-2.8 $HOME/
# .bashrc contains my custom aliases
cp -a .bashrc $HOME/
cp -a .face $HOME/
cp -a bin $HOME/

echo Restoring dconf settings
# "Perhaps first do a "dconf reset -f /org/cinnamon/" or "dconf reset -f /org/nemo/" 
# to reset all values to their default, before you load the customized values"
# - was not necessary for me on a fresh install of Mint 17.3 Cinnamon 
# might be necessary on a cloned OS
# This worked beautifully to restore a boatload of configuration!
dconf load /org/cinnamon/ < dconf.org.cinnamon
echo sleeping... waiting on dconf.org.cinnamon to complete...
sleep 5
dconf load /org/nemo/ < dconf.org.nemo

# make symlinks to my themes
ln -s $HOME/.themes/Dans_BurntOrangeLonghorn /usr/share/themes/Dans_BurntOrangeLonghorn
ln -s $HOME/.themes/Dans_MintyGreen-V3 /usr/share/themes/Dans_MintyGreen-V3
ln -s $HOME/.themes/Dans_RainyDayBlues /usr/share/themes/Dans_RainyDayBlues

# create a mount point for my data partition:
mkdir $HOME/sdb2_data
# add data partition to fstab
echo "# mount sdb2 on /home/dan/sdb2_data" | sudo tee -a /etc/fstab
echo "UUID=a299e544-0371-4856-912b-70458aa37ee1   /home/dan/sdb2_data   ext4   defaults,noatime   0   2" | sudo tee -a /etc/fstab
mount -a

echo DONE !
echo Do you want to reboot now?
while true
do
  echo -n "Please confirm y(es) or n(o):"
  read CONFIRM
  case $CONFIRM in
    y|Y|YES|yes|Yes) break ;;
    n|N|no|NO|No)
      echo Aborting - you entered $CONFIRM
      exit
      ;;
    *) echo Please enter only y or n
  esac
done
echo You entered $CONFIRM - rebooting...
shutdown -r now
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018
User avatar
Reorx
Level 12
Level 12
Posts: 4044
Joined: Tue Jul 07, 2009 7:14 pm
Location: SE Florida, USA

Re: "Upgrade" 32-bit to 64-bit

Post by Reorx »

austin.texas wrote:
jimallyn wrote:One potential problem I see is that the list of software you'll generate is of course all 32 bit stuff, and you will want the 64 bit stuff after installing the 64 bit OS. I don't know if the system is smart enough to handle that or not.
This is exactly right.
You can get a nice list of the installed programs with short descriptions (for reference), with the command:

Code: Select all

dpkg -l | grep ii >> installed-programs.list

You can look through that list to determine the actual names of the programs you want to re-install.
Then install with the command

Code: Select all

sudo apt-get install program1 program2 program3 program4
Austin;

I have used "dpkg --list > output_file" to generate this same list but - on MY system, the first terminal command generates a list that is ~2,150 lines - each line is a package! Is there a terminal command that will list only the packages that have been added but not include the packages in the base system???

To the OP - how much RAM is in the system??? If your RAM space is =< 2GB you might consider simply staying with the 32 bit OS. I don't know that there is much to be gained upgrading to a 64 bit OS with a small RAM space... unless, of course, you plan to upgrade the RAM. Also, since LM 18 Sarah is in development and should be out in about 4 to 6 weeks, you might want to wait for the release of LM18 to do this transition rather than having (wanting) to do it again so soon.
Last edited by Reorx on Thu May 12, 2016 11:47 am, edited 1 time in total.
Full time Linux Mint user since 2011 - Currently running LM21C on multiple Dell laptops - mostly Vostro models.

Image Image Image
User avatar
austin.texas
Level 20
Level 20
Posts: 12003
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: "Upgrade" 32-bit to 64-bit

Post by austin.texas »

Reorx wrote:I have used "dpkg --list > output_file" to generate this same list but - on MY system, the first terminal command generates a list that is ~2,150 lines - each line is a package! Is there a terminal command that will list only the packages that have been added but not include the packages in the base system???
The short answer "No"
The only way I know to approach that is apt-mark showmanual which will give you a list of "manually installed" packages. This includes packages installed by the installer, which is most of them. But if you run this after installation and compare the output again later, you'll get a list of packages which were installed after the OS was installed, excluding automatically installed dependencies.
For example: Save the current list of manually installed packages:

Code: Select all

apt-mark showmanual | sort > package-list-update.txt
Really, the simplest way to make a list of the programs that are important to you is to look through your menu and note the programs you installed.
I keep a running list, anytime I install anything.
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018
User avatar
Reorx
Level 12
Level 12
Posts: 4044
Joined: Tue Jul 07, 2009 7:14 pm
Location: SE Florida, USA

Re: "Upgrade" 32-bit to 64-bit

Post by Reorx »

austin.texas wrote:...Really, the simplest way to make a list of the programs that are important to you is to look through your menu and note the programs you installed.
I keep a running list, anytime I install anything.
I keep a running list too - but mine is short and somewhat "standard" - I keep the list in my head! :lol: And the short list is programs that I use on a somewhat regular basis so if I forget to install something on a new system and discover that when I want to use it - I just install it then.

And - in terms of "configuration" changes - most of my changes are to the functionality of CInnamon and they too are a short list and somewhat "standard" as well. So if I forget something, I can fix it as soon as I notice it.

P.S.: On my system, your latest terminal command generates a list that is 2,130 lines in length!.. I think your "Short answer" was right!!! :lol:
Full time Linux Mint user since 2011 - Currently running LM21C on multiple Dell laptops - mostly Vostro models.

Image Image Image
dEhiN

Re: "Upgrade" 32-bit to 64-bit

Post by dEhiN »

Hi all, my apologies for those who asked me further questions. I haven't signed into the LM Forums pretty much since my last reply on this thread. For anyone still curious what I did, I actually decided to go with LMDE 2 only because I'm more used to Debian (used to use it back around the early 2000s). I don't recall if I did generate any app list; I think I just installed whatever few 3rd party apps I had from scratch. (As in, I just found the repos again and added them to my sources.list or downloaded the .deb packages and installed them directly).

Someone asked me about RAM; I have 4GB in the system, so I figured it made sense to 64-bit (in this case, of LMDE 2). Thanks all for the help!
Locked

Return to “Installation & Boot”