Slackware - Installation This forum is for the discussion of installation issues with Slackware. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
05-26-2020, 05:34 AM
|
#16
|
LQ Veteran
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,844
|
Quote:
any idea what might've happened to /dev/sda4
|
The first partition in the logical partition will always be 5, regardless if the logical partition is one, two, or three as in your case.
|
|
1 members found this post helpful.
|
05-26-2020, 06:39 AM
|
#17
|
Senior Member
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674
|
Quote:
Originally Posted by colorpurple21859
The first partition in the logical partition will always be 5, regardless if the logical partition is one, two, or three as in your case.
|
That should be "extended" partition in both cases.
Logical partitions are the ones within the extended partition and indeed: they always start at 5 as the number 1 thru 4 are reserved for the primary partitions.
This is all "classic" boot partition tables, in GPT the difference between primary and logical partitions have disappeared and you do not need extended partitions anymore.
|
|
1 members found this post helpful.
|
05-26-2020, 07:04 AM
|
#18
|
Member
Registered: Jan 2020
Location: Canada
Distribution: Slackware
Posts: 273
Original Poster
Rep: 
|
Quote:
Originally Posted by colorpurple21859
every time you reboot a live system, you have to rerun the mount commands to mount your system to /mnt before you chroot.
from the ubuntu live post the output of
|
I know. I reran the mount commands before trying to chroot. And I swapped out the Ubuntu live usb for the slackware live usb to do the mounting/chrooting again.
doing parted -l gives me my partition table:
Code:
Model: ATA ST250LT002-9VM14 (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049KB 525MB 524MB Primary ext4 boot
2 525MB 4820MB 4295MB Primary linux-swap(v1)
3 4820MB 250GB 245GB extended
5 4821MB 26.3GB 21.5GB logical ext4
6 26.3GB 134GB 107GB logical ext4
|
|
|
05-26-2020, 07:09 AM
|
#19
|
Member
Registered: Jan 2020
Location: Canada
Distribution: Slackware
Posts: 273
Original Poster
Rep: 
|
Quote:
Originally Posted by colorpurple21859
no, the last partition you mounted to /mnt is what you would see at /mnt. Maybe why you got the /bin/bash error.
What is on /dev/sda5 and /dev/sda6? Without knowing what is on the partitions can't really say how to mount them, but for an example
assuming /dev/sda5 is / and /dev/sda6 is your home partition and /dev/sda1 is the boot partition, it would be something like this,
Code:
mount /dev/sda5 /mnt
mount /dev/sda1 /mnt/boot
mount /dev/sda6 /mnt/home
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mount -o bind /run /mnt/run
chroot /mnt
You will need to change accordingly if it is something different.
|
Ah thanks, I think I see where I went wrong then. And you assumed my partitions correctly. root is sda5, home is 6. 1 is boot.
Could you explain what the bind command is doing exactly? is it doing something similar to a symlink?
|
|
|
05-26-2020, 07:18 AM
|
#20
|
LQ Veteran
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,844
|
The slackware live usb would be better for doing this .
Yes it is extended partition, to early in the morning logical was stuck im my head
|
|
|
05-26-2020, 07:21 AM
|
#21
|
Senior Member
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674
|
Quote:
Originally Posted by burning
Could you explain what the bind command is doing exactly?
|
It's making sure that the "real" /dev, /sys, /proc and /run are available within the /mnt tree too, for when you do the chroot the original directories aren't reachable anymore (/mnt becomes the "new /").
From the man page for mount:
Code:
Since Linux 2.4.0 it is possible to remount part of the file
hierarchy somewhere else. The call is
mount --bind olddir newdir
or shortoption
mount -B olddir newdir
or fstab entry is:
/olddir /newdir none bind
After this call the same contents is accessible in two places.
|
|
1 members found this post helpful.
|
05-27-2020, 08:02 AM
|
#22
|
Member
Registered: Jan 2020
Location: Canada
Distribution: Slackware
Posts: 273
Original Poster
Rep: 
|
Quote:
Originally Posted by ehartman
It's making sure that the "real" /dev, /sys, /proc and /run are available within the /mnt tree too, for when you do the chroot the original directories aren't reachable anymore (/mnt becomes the "new /").
From the man page for mount:
Code:
Since Linux 2.4.0 it is possible to remount part of the file
hierarchy somewhere else. The call is
mount --bind olddir newdir
or shortoption
mount -B olddir newdir
or fstab entry is:
/olddir /newdir none bind
After this call the same contents is accessible in two places.
|
So just to clarify, so I understand what's going on here exactly; by "real", do you mean the directories on the actual hard drive? or the directories on the live USB?
|
|
|
05-27-2020, 08:12 AM
|
#23
|
LQ Guru
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342
|
Quote:
Originally Posted by burning
Ah thanks, I think I see where I went wrong then. And you assumed my partitions correctly. root is sda5, home is 6. 1 is boot.
Could you explain what the bind command is doing exactly? is it doing something similar to a symlink?
|
I think you should just do your chroot get it fix then worry about what bind does afterwards man bind
|
|
1 members found this post helpful.
|
05-27-2020, 08:55 AM
|
#24
|
Member
Registered: Jan 2020
Location: Canada
Distribution: Slackware
Posts: 273
Original Poster
Rep: 
|
Quote:
Originally Posted by BW-userx
I think you should just do your chroot get it fix then worry about what bind does afterwards man bind
|
I was just doing it now. I managed to get chroot into the drive but I can't seem to slackpkg update as i can't connect to the internet, through wireless or even through ethernet. I tried checking for blocks, soft and hard by doing rfkill list and rfkill unblock wlan but it just said "rfkill: cannot open /dev/rfkill: No such file or directory
rfkill: cannot read /dev/rfkill: Bad file descriptor" and
rfkill: cannot open /dev/rfkill: No such file or directory" respectively.
I also tried doing eth0 up but that just gave me "sh: eth0: command not found
Running ifconfig -a shows me my eth0 interface and lo but doesn't detect the wireless card. Ignoring the lack of wireless, as it's likely that will fix itself once I update everything, how can I get my ethernet working?
output of ifconfig for eth0:
Code:
# ifconfig
eth0: flags=4163<UP, BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::216:41ff:fee2:6ba prefixlen 64 scopeid 0x20<link>
inet6 2a02:c7f:683:f300:216:41ff:fee2:6ba prefixlen 64 scopeid 0x0<global>
inet6 fde9:a858:61b8:0:216:41ff:fee2:6ba prefixlen 64 scopeid 0x0<global>
ether 00:16:41:e2:06:ba txqueuelen 1000 (Ethernet)
RX packets 1965 bytes 135756 (132.5KiB)
RX errors 0 dropped 1910 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 16 memory 0xee000000-ee020000
Last edited by burning; 05-27-2020 at 09:33 AM.
|
|
|
05-27-2020, 09:23 AM
|
#25
|
Senior Member
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674
|
Quote:
Originally Posted by burning
do you mean the directories on the actual hard drive? or the directories on the live USB?
|
The ones your running system has created. None of these directories (their contents) is actually on any disk at all, they're so-called "pseudo" filesystems, that reflect the current devices, kernel info, running tasks, etc. Like this (mount info):
Code:
udev on /dev type devfs (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
so none of them are "disk" file systems.
After the chroot the system still needs that info, so that's why you have to do the bind mounts.
Last edited by ehartman; 05-27-2020 at 09:27 AM.
|
|
1 members found this post helpful.
|
05-27-2020, 12:03 PM
|
#26
|
LQ Veteran
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,844
|
Maybe adding this to /etc/resolv.conf will help
nameserver 8.8.8.8
|
|
1 members found this post helpful.
|
05-28-2020, 06:46 AM
|
#27
|
Member
Registered: Jan 2020
Location: Canada
Distribution: Slackware
Posts: 273
Original Poster
Rep: 
|
Quote:
Originally Posted by colorpurple21859
Maybe adding this to /etc/resolv.conf will help
nameserver 8.8.8.8
|
Nope. It didn't do anything. I've tried netconfig, both with DHCP and NetworkManager, I've tried "ifconfig eth0 up". But neither of them did anything. I'm connected to my router using ethernet but the little green light on my laptop that says its at least trying to connect to a network just won't turn on. I can't connect to the internet at all. For some reason it can't even detect my wlan0 interface when it could just fine before I messed everything up.
I do get the feeling I'm forgetting some kind of obvious solution though.
For some reason the output of ifconfig was different today:
output of ifconfig for eth0:
Code:
# ifconfig
eth0: flags=4163<UP, BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 00:16:41:e2:06:ba txqueuelen 1000 (Ethernet)
RX packets 1429 bytes 102436 (100KiB)
RX errors 0 dropped 1198 overruns 0 frame 0
TX packets 1 bytes 394 (394.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 16 memory 0xee000000-ee020000
Last edited by burning; 05-28-2020 at 06:51 AM.
|
|
|
05-28-2020, 10:35 AM
|
#28
|
LQ Guru
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792
|
I've never tried to get network running from within a chroot. If you just want to update your config files with the new .new files, you don't need network. You can simply run:
Code:
slackpkg new-config
If you do want to get network running, I'd try running dhcpcd eth0 and see if you get an IP address.
|
|
1 members found this post helpful.
|
05-28-2020, 06:51 PM
|
#29
|
LQ Veteran
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,844
|
Sometimes what I posted above works,
but when it doesn't, first I make sure the host is connected to internet and then I do this before chrooting.
Code:
mv /mnt/etc/resolve.conf /mnt/etc/resolv.conf.bak
Code:
cp /etc/resolv.conf /mnt/etc/resolv.conf
Last edited by colorpurple21859; 05-28-2020 at 06:53 PM.
|
|
1 members found this post helpful.
|
05-29-2020, 05:35 AM
|
#30
|
LQ Veteran
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,844
|
from within chroot maybe
dhcpcd eth0
|
|
1 members found this post helpful.
|
All times are GMT -5. The time now is 03:27 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|