Showing posts with label Debian Linux. Show all posts
Showing posts with label Debian Linux. Show all posts

Installed Debian Linux to Dualboot with Windows 10, but can't boot to Debian

How to fix: After Installing Debian for dualbooting with Windows 10, just boots straight to WIN10 without a choice

Let's say you have installed Debian with Windows 10, in your UEFI system, you have all the right kernel parameters set and UEFI configs and all the partitions are all set and mounted right, windows 10 was installed before you installed Linux and you got /boot/efi at fat32/vfat FS, but your comp just boots straight to Windows 10 without a choice to boot to Debian, the reason is Windows will usually try and make its bootloader default again which means Debian isn't an option, well the easy fix as long as you got everything right on the basic install would be:


1.) Boot up Windows 10

2.) Then start a terminal console (command prompt), but run as administrator

3.) Issue this command at the console:

bcdedit /set {bootmgr} path \EFI\debian\grubx64.efi

4.) Reboot, and it should give you a choice to boot to Debian Linux or Windows 10 now, if not look to changing the boot order of operating systems installed in your computer in your computer firmware, and change it to Debian as mentioned in NOTES below.


*NOTES:
- You can reuse the EFI partition that windows 10 uses, just mount that as /boot/efi with Linux, its recommended that there be only one EFI partition per disk, so if you have 2 disks and you install windows and linux in each disk you can either reuse the efi partition that windows 10 has but make sure its atleast 300MB or bigger, you can resize the partition before installing, but dont delete and format the existing EFI windows 10 is using as it already contains necessary files Windows 10 needs or you can and this is recommended just make another efi partition on the disk linux will be installed in.
- There's also the option to change the boot order of OS'es in the BIOS/UEFI firmware of your computer/laptop, however there are many versions and kinds of firmware and each firmware can look somewhat different, so its kinda tough to give a step by step one size fixes all procedure here about that but the option to choose the order should be located in the BOOT category, all you have to do then is make sure you set Debian as the primary OS at boot, save then exit and restart.
- You could also try GrubEFIReinstall
- For Ubuntu you can use:

bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi 

in place of the debian command above.

/var/cache/debconf/config.dat Is Locked by Another Process: Resource Temporarily Unavailable

a Debian apt-get error lock: 

/var/cache/debconf/config.dat Is Locked by Another Process: Resource Temporarily Unavailable

 

When issuing apt-get install commands you get this error output -

/var/cache/debconf/config.dat Is Locked by Another Process: Resource Temporarily Unavailable

(for example trying to install an app like debconf with apt-get install debconf), and thus unable to use apt-get nor dpkg, to fix this problem is to kill the associated process holding a lock on that file.

Issue command in terminal:

# fuser -v /var/cache/debconf/config.dat

then grab the PID number of that output (for an example PID number 9999),
and issue the command in terminal to kill the problematic process:

# kill -9 9999

it should now work and so you can now run apt-get and dpkg.

How to Upgrade a Specific Package and Nothing Else in Debian:

How to Upgrade a Specific Package and Nothing Else in Debian:

# apt-get install --only-upgrade <packagename>

ex:

# apt-get install --only-upgrade htop

- This command will only upgrade the already installed htop package in your debian system, and not upgrade anything else

Install Asian CJK Langauge Font Character Support in Debian (in this case Japanese, Chinese, Korean)

Install Asian CJK Langauge Font Character Support in OpenSUSE (in this case Japanese, Chinese, Korean):


Issue command at terminal:

# apt-get install fonts-arphic-ukai fonts-arphic-uming fonts-ipafont-mincho fonts-ipafont-gothic fonts-unfonts-core xfonts-intl-asian fonts-noto-cjk



 NOTES:

- List fonts with this command:


$ fc-list

- Rebuilds cached list of fonts (after installing fonts and it doesnt work, run this command):


$ fc-cache -fv

-  So a better way to install it all and rebuild the cache list of fonts after in one command:


# apt-get install fonts-arphic-ukai fonts-arphic-uming fonts-ipafont-mincho fonts-ipafont-gothic fonts-unfonts-core xfonts-intl-asian fonts-noto-cjk && fc-cache -fv

How to Fix Common Broken Dependencies Problem with APT in Debian Linux

How to Fix Common Broken Dependencies Problem with APT in Debian Linux:
Example with Google Chrome

*Fixing Dependencies with apt-get -f install After installing a .deb Binary with dpkg

*After downloading Google Chrome Debian from Google, then installe it with dpkg

# dpkg -i google-chrome-*.deb

Selecting previously unselected package google-chrome-stable.
(Reading database ... 118596 files and directories currently installed.)
Preparing to unpack google-chrome-stable_current_amd64.deb ...
Unpacking google-chrome-stable (52.0.2743.82-1) ...
dpkg: dependency problems prevent configuration of google-chrome-stable:
 google-chrome-stable depends on fonts-liberation; however:
  Package fonts-liberation is not installed.
 google-chrome-stable depends on libappindicator1; however:
  Package libappindicator1 is not installed.

dpkg: error processing package google-chrome-stable (--install):
 dependency problems - leaving unconfigured
Processing triggers for gnome-menus (3.13.3-6) ...
Processing triggers for desktop-file-utils (0.22-1) ...
Processing triggers for mime-support (3.59) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for menu (2.1.47) ...
Errors were encountered while processing:
 google-chrome-stable

*Google Chrome was installed but it had some errors with some missing dependencies, doing 
# apt-get -f install 
, fixes this

Reading package lists... Done
Building dependency tree      
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  fonts-liberation libappindicator1 libdbusmenu-gtk4 libindicator7
The following NEW packages will be installed:
  fonts-liberation libappindicator1 libdbusmenu-gtk4 libindicator7
0 upgraded, 4 newly installed, 0 to remove and 757 not upgraded.
1 not fully installed or removed.
Need to get 1,031 kB of archives.
After this operation, 2,566 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://ftp.debian.org/debian unstable/main amd64 fonts-liberation all 1.07.4-1 [835 kB]
Get:2 http://ftp.debian.org/debian unstable/main amd64 libdbusmenu-gtk4 amd64 12.10.2-1 [90.8 kB]
Get:3 http://ftp.debian.org/debian unstable/main amd64 libindicator7 amd64 0.5.0-3 [52.6 kB]                                                                                                
Get:4 http://ftp.debian.org/debian unstable/main amd64 libappindicator1 amd64 0.4.92-4 [52.5 kB]                                                                                            
Fetched 1,031 kB in 7s (130 kB/s)                                                                                                                                                           
Selecting previously unselected package fonts-liberation.
(Reading database ... 118702 files and directories currently installed.)
Preparing to unpack .../fonts-liberation_1.07.4-1_all.deb ...
Unpacking fonts-liberation (1.07.4-1) ...
Selecting previously unselected package libdbusmenu-gtk4:amd64.
Preparing to unpack .../libdbusmenu-gtk4_12.10.2-1_amd64.deb ...
Unpacking libdbusmenu-gtk4:amd64 (12.10.2-1) ...
Selecting previously unselected package libindicator7:amd64.
Preparing to unpack .../libindicator7_0.5.0-3_amd64.deb ...
Unpacking libindicator7:amd64 (0.5.0-3) ...
Selecting previously unselected package libappindicator1:amd64.
Preparing to unpack .../libappindicator1_0.4.92-4_amd64.deb ...
Unpacking libappindicator1:amd64 (0.4.92-4) ...
Setting up libindicator7:amd64 (0.5.0-3) ...
Setting up fonts-liberation (1.07.4-1) ...
Setting up libdbusmenu-gtk4:amd64 (12.10.2-1) ...
Processing triggers for libc-bin (2.21-7) ...
Processing triggers for fontconfig (2.11.0-6.3) ...
Setting up libappindicator1:amd64 (0.4.92-4) ...
Setting up google-chrome-stable (52.0.2743.82-1) ...
update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/x-www-browser (x-www-browser) in auto mode
update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/gnome-www-browser (gnome-www-browser) in auto mode
update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/google-chrome (google-chrome) in auto mode
Processing triggers for libc-bin (2.21-7) ...
Processing triggers for menu (2.1.47) ...

*Google Chrome now works, broken dependency issue now fixed


Further Notes:
- The command # apt-get -f install is usually used for when troubleshooting debian based system when there are installation dependency issues or upgrade issues after

How to Install Google Chrome Web Browser in Debian

A) Install Google Chrome in Debian with apt-get:

1.) Issue command at terminal

$ wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

2.) Then edit /etc/apt/sources.list with an editor

# emacs -nw /etc/apt/sources.list

paste the following: deb http://dl.google.com/linux/chrome/deb/ stable main

save and exit.

3.) Sync with repos

# apt-get update

4.) Install google chrome:

# apt-get install google-chrome-stable


Notes:


*Actually you have a choice of different versions
        google-chrome-beta (for beta)
        google-chrome-stable (for stable)
        google-chrome-unstable (for unstable/bleeding edge

*Recent versions of apt-get will automatically attempt to verify packages on download. If an appropriate key is not found or if the package is corrupted, you will get a message like the following:
   
             WARNING: The following packages cannot be authenticated! packagename

If you see this using this method dont worry about it, just choose y to say yes, to install these packages without verification? [y/N] y and let it install


/or


B) Downloading the binary from google and installing with dpkg manually:

1.) Open a terminal window.
2.) Type in the following commands then hit Enter after each.

For 32-bit systems:
$ wget -c https://dl.google.com/linux/direct/google-chrome-stable_current_i386.deb
 # dpkg -i google-chrome-*.deb
 # apt-get install -f

For 64-bit systems:
$ wget -c wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
 # dpkg -i google-chrome-*.deb
 # apt-get install -f


Notes:
*To avoid error messages and annoying authentication errors with debian sources.list and google repo, its better to just download the binary and install with dpkg manually, even with debian sid
*When upgrading to a newer version, just download it again, and repeat the procedure, dpkg -i actually installs and upgrades the package if there is already an older version
*Reference to dpkg cheatsheet - A dpkg Cheat Sheet

Boot Debian Linux in Console/Text/Terminal at Start-up

Boot Debian Linux in Console/Text/Terminal at Start-up:


You can boot your debian machine to Console/Text/Terminal mode do so by disabling your login manager such as KDM, GDM or XDM from running at boot time.


To disable the login manager from automatically running at boot up, run the following command as root

# update-rc.d -f kdm remove

Replace kdm with gdm or xdm if they are what you use.

To start X manually, you would then have to login at the command prompt and enter the command:

$ startx

To reset your login manager so that it runs at boot up, do:

# update-rc.d -f kdm defaults



*NOTES:

- The $ sign at the start of the command is to signify the terminal's prompt, no need to type this in
- The # sign at the start of the command is to signify the root user's terminal prompt, no need to type this in

Boot LinuxMint Debian (LMDE) in Console/Text/Terminal at Start-Up



Boot LinuxMint Debian (LMDE) in Console/Text/Terminal at start up:


Edit /etc/default/grub to boot LinuxMint Debian into console mode, You shouldn't just sudo nano /boot/grub/grub.cfg and put "text" there, there's a big warning against it at the top of the file.

The right way is to:
$ sudo nano /etc/default/grub


And add "text" to GRUB_CMDLINE_LINUX_DEFAULT.
So if it looked like:

    GRUB_CMDLINE_LINUX_DEFAULT="quiet"

...you have to change it to:

    GRUB_CMDLINE_LINUX_DEFAULT="quiet text"

update grub

$ sudo update-grub

And reboot.

This method is preferred over disabling a service, since it's what it should be: editing one line in a configuration file. The same process can be repeated, and, if you want, startx will bring you to the user graphical interface while in text mode.

To return to normal, of course, just edit the file again and update-grub.

*NOTES:


- The $ sign at the start of the command is to signify the terminal's prompt, no need to type this in
- Doesn't seem to work in Vanilla Debian Sid (Unstable) do not use this unless you want to never boot in X/GUI, if you ever did do this, you can fix it by changing the grub defaults in CLI, then update-grub and restart.