[SOLVED] apt-get update doesn't work in safe mode

New to Debian (Or Linux in general)? Ask your questions here!

[SOLVED] apt-get update doesn't work in safe mode

Postby Mephistopheles » 2017-08-27 09:47

[EDIT] This problem is now solved thanks to the people who took time out of their day to help me out! I apologise for me ever seeming rude or making stupid mistakes. Thanks to everyone who helped.

I've recently just installed Debian 9, and after many problems trying to boot it (viewtopic.php?f=30&t=134445) I've finally managed to boot into safe mode to access a terminal and adjust sources.list to try and get
Code: Select all
apt-get update

to work, but whenever I attempt to use the command, it pastes this into the console:

Code: Select all
Err:1 http://ftp.uk.debian.org/debian stretch InRelease
  Could not resolve 'ftp.uk.debian.org'
Err:2 http://ftp.uk.debian.org/debian stretch InRelease
  Could not resolve 'ftp.uk.debian.org'
Err:3 http://ftp.uk.debian.org/debian stretch InRelease
  Could not resolve 'ftp.uk.debian.org'
Reading package list... Done
W: Failed to fetch http://ftp.uk.debian.org/debian/dists/stretch/InRelease Could not resolve 'ftp.uk.debian.org'
W: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/InRelease Could not resolve 'security.debian.org'
W: Failed to fetch http://ftp.uk.debian.org/debian/dists/stretch-updates/InRelease Could not resolve 'ftp.uk.debian.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.


I've been told that I just need to get the network working, but I'm unsure as to how I should do that. I'm connected wirelessly to my router through a wifi booster
Last edited by Mephistopheles on 2017-08-27 20:07, edited 2 times in total.
Mephistopheles
 
Posts: 20
Joined: 2017-08-25 07:13

Re: apt-get update doesn't work in safe mode

Postby pylkko » 2017-08-27 10:10

In single user mode, network is disabled by default. You need to form a network connection first. I believe that root is mounted read only also, so in order to make changes you need to remount it
Last edited by pylkko on 2017-08-27 10:10, edited 1 time in total.
User avatar
pylkko
 
Posts: 1179
Joined: 2014-11-06 19:02

Re: apt-get update doesn't work in safe mode

Postby dilberts_left_nut » 2017-08-27 10:10

AdrianTM wrote:There's no hacker in my grandma...
User avatar
dilberts_left_nut
 
Posts: 4691
Joined: 2009-10-05 07:54
Location: enzed

Re: apt-get update doesn't work in safe mode

Postby Mephistopheles » 2017-08-27 10:18

pylkko wrote:In single user mode, network is disabled by default. You need to form a network connection first. I believe that root is mounted read only also, so in order to make changes you need to remount it

How would one go about remounting root?
Mephistopheles
 
Posts: 20
Joined: 2017-08-25 07:13

Re: apt-get update doesn't work in safe mode

Postby kedaha » 2017-08-27 10:19

First thing to do is to Indentify the device.
A command like lspci -nn will generate a lot of output, so it's better to narrow it down, assuming it's a PCI device, with a command like:
Code: Select all
$ lspci -nn -kk |grep -i network

The man pages will give you more information about such commands like:
lspci - list all PCI devices
-nn Show PCI vendor and device codes as both numbers and names.
-vv Be very verbose and display more details. This level includes everything deemed useful.
grep print lines matching a pattern
-i Ignore case
Mate DE & OSSv4.
LaMp, WordPress; ispmail
Debian Stable & Software

Words, as is well known, are the great foes of reality. Joseph Conrad.
User avatar
kedaha
 
Posts: 2797
Joined: 2008-05-24 12:26

Re: apt-get update doesn't work in safe mode

Postby kedaha » 2017-08-27 10:26

Mephistopheles wrote:How would one go about remounting root?

Check this out:
Code: Select all
mount -o ro,remount /
Mate DE & OSSv4.
LaMp, WordPress; ispmail
Debian Stable & Software

Words, as is well known, are the great foes of reality. Joseph Conrad.
User avatar
kedaha
 
Posts: 2797
Joined: 2008-05-24 12:26

Re: apt-get update doesn't work in safe mode

Postby Mephistopheles » 2017-08-27 10:36

kedaha wrote:First thing to do is to Indentify the device.
A command like lspci -nn will generate a lot of output, so it's better to narrow it down, assuming it's a PCI device, with a command like:
Code: Select all
$ lspci -nn -kk |grep -i network

The man pages will give you more information about such commands like:
lspci - list all PCI devices
-nn Show PCI vendor and device codes as both numbers and names.
-vv Be very verbose and display more details. This level includes everything deemed useful.
grep print lines matching a pattern
-i Ignore case


I've tried typing out
Code: Select all
lspci -nn -kk | grep -i network

But it gives no output at all, I only get an output if I type
Code: Select all
lspci -nn -kk

or
Code: Select all
lspci -nn

I also get an output if I type
Code: Select all
lspci -nn -kk -i network

When I type the latter, the only output I get that's remotely related to internet is this:
Code: Select all
Ethernet controller [0200]: Qualcomm Atheros Killer E220x Gigabit Ethernet Controller [1969:e091 (rev 10)
Subsystem: Gigabit Technology Co., Ltd Killer E220x Gigabit Ethernet Controller [1458:e000]
Kernel driver in use: alx
Kernel modules: alx

I think the reason it classes it as an Ethernet connection is because I'm connected to the wifi booster via an ethernet cable, but the connection is still wireless.

kedaha wrote:
Mephistopheles wrote:How would one go about remounting root?

Check this out:
Code: Select all
mount -o ro,remount /


I've typed this in and the output read
Code: Select all
[ 7123.543070 EXT4-fs (sda3): re-mounted. 0pts: errors=remount-ro
Mephistopheles
 
Posts: 20
Joined: 2017-08-25 07:13

Re: apt-get update doesn't work in safe mode

Postby Lysander » 2017-08-27 10:57

OP, have you actually read through - thoroughly - the links that d_l_n pointed you to? You didn't respond to his post and you're getting into dropping-sequential-Qs-into-your-thread mode.

I get the impression you're getting frustrated. I would take some time to read around and build yourself a knowledge base through the Debian Wiki. That should always be your first port of call before posting. Take a step back from the forums.

By the way, in the time you have taken to install [or to attempt to install] Debian and post here repeatedly over the last few days, you could have had Ubuntu up and running. Just a thought. Second thought: installing an easier OS is also a way of generating a knowledge-base. Third thought: don't waste your whole bank holiday weekend on this.
User avatar
Lysander
 
Posts: 349
Joined: 2017-02-23 10:07
Location: London

Re: apt-get update doesn't work in safe mode

Postby Mephistopheles » 2017-08-27 11:04

Lysander wrote:OP, have you actually read through - thoroughly - the links that d_l_n pointed you to? You didn't respond to his post and you're getting into dropping-sequential-Qs-into-your-thread mode.


I'm in the process of reading through them, though most of the commands I come across don't seem to exist, as when I type things in such as iwconfig it displays an output that states no such command exists. In the meantime of reading through the links he gave me and attempting mostly non-existent commands I thought I'd continue trying to find as many other solutions as I can and trying them out alongside everything else.

Lysander wrote:By the way, in the time you have taken to install [or to attempt to install] Debian and post here repeatedly over the last few days, you could have had Ubuntu up and running. Just a thought..


I've already tried installing Ubuntu LTS and Ubuntu, neither of them will even install, I press the install button and both of them just display a black screen in which I can't type anything, I've left them like this for hours but to no avail, and I've researched into it and nothing people have suggested has worked so I just left Debian on my system, and whist it was there I thought I might as well put as much effort into solving my problem as I can.
Mephistopheles
 
Posts: 20
Joined: 2017-08-25 07:13

Re: apt-get update doesn't work in safe mode

Postby Lysander » 2017-08-27 11:15

Mephistopheles wrote:I press the install button and both of them just display a black screen in which I can't type anything


How are you testing these OSs, is it through a live USB? Are you able to boot into the live environment and test the OS?

Here's something I got from a quick Google. Have you tried using integrated graphics to install the OS?

https://askubuntu.com/questions/469377/ ... gtx-750-ti
https://askubuntu.com/questions/795547/ ... h-gtx-1080
User avatar
Lysander
 
Posts: 349
Joined: 2017-02-23 10:07
Location: London

Re: apt-get update doesn't work in safe mode

Postby Mephistopheles » 2017-08-27 11:19



In the first link it mentions "wireless-tools", which I do not believe my system has. So I typed
Code: Select all
apt-get install wireless-tools

into the console, after detecting 2 new files to install, it prints errors to the console that state it failed to fetch certain archives. If I add "--fix-missing" at the end of the "apt-get install" command, it fails to fetch the archives again but this time it aborts the installation as stated by the console's output.
Mephistopheles
 
Posts: 20
Joined: 2017-08-25 07:13

Re: apt-get update doesn't work in safe mode

Postby Mephistopheles » 2017-08-27 11:20

Lysander wrote:
Mephistopheles wrote:I press the install button and both of them just display a black screen in which I can't type anything


How are you testing these OSs, is it through a live USB? Are you able to boot into the live environment and test the OS?

Here's something I got from a quick Google. Have you tried using integrated graphics to install the OS?

https://askubuntu.com/questions/469377/ ... gtx-750-ti
https://askubuntu.com/questions/795547/ ... h-gtx-1080


I can't boot into a live environment as I get the same issue, and if I try using integrated graphics it leads me to a log with a lot of errors printed in it.

[EDIT] After reading the first link and setting my primary graphics driver to the Intel On-Board Graphics, I rebooted into Debian and it booted properly.
Mephistopheles
 
Posts: 20
Joined: 2017-08-25 07:13

Re: apt-get update doesn't work in safe mode

Postby kedaha » 2017-08-27 11:28

In single-user mode some programs don't work.
The good news is that your wireless network card driver is included in the kernel so it must work.
Are you able to ping?
$ ping google.com
Mate DE & OSSv4.
LaMp, WordPress; ispmail
Debian Stable & Software

Words, as is well known, are the great foes of reality. Joseph Conrad.
User avatar
kedaha
 
Posts: 2797
Joined: 2008-05-24 12:26

Re: apt-get update doesn't work in safe mode

Postby Mephistopheles » 2017-08-27 11:30

kedaha wrote:In single-user mode some programs don't work.
The good news is that your wireless network card driver is included in the kernel so it must work.
Are you able to ping?
$ ping google.com


Since I've finally managed to boot into Debian and log into my account, I'm able to ping, but I did try to ping google in single-user mode and it didn't seem to work, but I may have typed the address in wrong.
Mephistopheles
 
Posts: 20
Joined: 2017-08-25 07:13

Re: apt-get update doesn't work in safe mode

Postby kedaha » 2017-08-27 11:33

OK, as root run this:
Code: Select all
# dhclient
Mate DE & OSSv4.
LaMp, WordPress; ispmail
Debian Stable & Software

Words, as is well known, are the great foes of reality. Joseph Conrad.
User avatar
kedaha
 
Posts: 2797
Joined: 2008-05-24 12:26

Next

Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 9 guests

fashionable