LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation
User Name
Password
Slackware - Installation This forum is for the discussion of installation issues with Slackware.

Notices


Reply
  Search this Thread
Old 05-26-2020, 05:34 AM   #16
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,844

Rep: Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683

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.
Old 05-26-2020, 06:39 AM   #17
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by colorpurple21859 View Post
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.
Old 05-26-2020, 07:04 AM   #18
burning
Member
 
Registered: Jan 2020
Location: Canada
Distribution: Slackware
Posts: 273

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
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
Code:
sudo parted -l
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
 
Old 05-26-2020, 07:09 AM   #19
burning
Member
 
Registered: Jan 2020
Location: Canada
Distribution: Slackware
Posts: 273

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
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?
 
Old 05-26-2020, 07:18 AM   #20
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,844

Rep: Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683
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
 
Old 05-26-2020, 07:21 AM   #21
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by burning View Post
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.
Old 05-27-2020, 08:02 AM   #22
burning
Member
 
Registered: Jan 2020
Location: Canada
Distribution: Slackware
Posts: 273

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ehartman View Post
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?
 
Old 05-27-2020, 08:12 AM   #23
BW-userx
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

Rep: Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243
Quote:
Originally Posted by burning View Post
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.
Old 05-27-2020, 08:55 AM   #24
burning
Member
 
Registered: Jan 2020
Location: Canada
Distribution: Slackware
Posts: 273

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by BW-userx View Post
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.
 
Old 05-27-2020, 09:23 AM   #25
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by burning View Post
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.
Old 05-27-2020, 12:03 PM   #26
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,844

Rep: Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683
Maybe adding this to /etc/resolv.conf will help
nameserver 8.8.8.8
 
1 members found this post helpful.
Old 05-28-2020, 06:46 AM   #27
burning
Member
 
Registered: Jan 2020
Location: Canada
Distribution: Slackware
Posts: 273

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
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.
 
Old 05-28-2020, 10:35 AM   #28
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6665Reputation: 6665Reputation: 6665Reputation: 6665Reputation: 6665Reputation: 6665Reputation: 6665Reputation: 6665Reputation: 6665Reputation: 6665Reputation: 6665
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.
Old 05-28-2020, 06:51 PM   #29
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,844

Rep: Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683
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.
Old 05-29-2020, 05:35 AM   #30
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,844

Rep: Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683Reputation: 1683
from within chroot maybe
dhcpcd eth0
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SARPI on Pi3 - Ran slackpkg update & slackpkg upgrade-all and now won't boot, can't find init petejc Slackware - ARM 11 03-25-2020 04:30 AM
upgraded to -current from 14.2 and then upgraded multilib, breaking everything dimm0k Slackware 1 02-16-2020 05:20 PM
[SOLVED] Updating through slackpkg didnt upgraded the kernel in slackware64-current sinar.kk Slackware 10 02-26-2016 06:08 AM
[SOLVED] Can't boot into -current partition after slackpkg upgrade-all, after kernel upgraded gabytf Slackware 7 08-12-2012 10:42 AM
[SOLVED] Upgraded to 13.1 and can no longer login to X damgar Slackware 1 05-25-2010 08:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation

All times are GMT -5. The time now is 03:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration