LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-17-2018, 03:55 PM   #1
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,521

Rep: Reputation: Disabled
Help wanted (probing block devices for partitions characterization in the Slackware installer)


Hello,

I am elaborating proposals to simplify the Slackware installer, making use of tools providing features available relatively recently.

One of these proposal is about probing the partitions on block devices. Currently this is done in the installer by the script /sbin/probe, which is run by several scripts in /usr/lib/setup. I attach it to this post (version found at time of writing in the compressed archive skeleton_initrd.tar.gz in the source of the installer for Slackware64-current). I am wondering if it would be possible nowadays to just replace it by a shell command using fdisk.

Also, I consider using lsblk to replace various utilities used by scripts in /usr/lib/setup/setup. This also needs testing on a wide range of devices and partitions types.

I need help to test with settings of devices that I do not have at hand. So, if you use specific devices or settings like:
  • Old IDE drives,
  • Raid devices, like Mylex RAID, Compaq SMART2 or any other kind,
  • ATA RAID,
  • CISS aka HP Smart Array,
  • LVM,
  • LUKS encrypted volumes,
  • Virtual partitions,
  • NVMe,
  • eMMC,
  • MD devices (software RAID),
  • Other kinds of devices partitions or settings I have never heard of or I forgot to mention,
please run the following commands as root in a running system and post the output in this thread, preferably as an attachment (file whose name ends in .txt) with relevant comments about the devices partitions and use case.


Code:
LANG=POSIX fdisk -l -o device,size,type|grep ^/
lsblk -l -o vendor,model,name,parttype,uuid,pkname,tran,hotplug,fstype,type,size,mountpoint
Thanks in advance for your cooperation.
Attached Files
File Type: txt probe.txt (12.4 KB, 28 views)

Last edited by Didier Spaier; 07-17-2018 at 04:07 PM.
 
Old 07-18-2018, 02:05 AM   #2
linuxtinker
Member
 
Registered: Dec 2013
Location: NJ / USA
Distribution: Slackware 64 -Current
Posts: 200

Rep: Reputation: 92
Here is a system with software raid...
Attached Files
File Type: txt mdsystem.txt (4.3 KB, 18 views)
 
1 members found this post helpful.
Old 07-18-2018, 02:56 AM   #3
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 4,423

Rep: Reputation: 2349Reputation: 2349Reputation: 2349Reputation: 2349Reputation: 2349Reputation: 2349Reputation: 2349Reputation: 2349Reputation: 2349Reputation: 2349Reputation: 2349
the three boxes I use most: mediacenter has software raid, the other two are JIC...
Attached Files
File Type: txt preacher.txt (2.3 KB, 14 views)
File Type: txt mediacenter.txt (3.1 KB, 9 views)
File Type: txt toscibo.txt (1.8 KB, 12 views)

Last edited by ponce; 07-18-2018 at 03:39 AM.
 
1 members found this post helpful.
Old 07-18-2018, 07:46 AM   #4
AlleyTrotter
Member
 
Registered: Jun 2002
Location: Coal Township PA
Distribution: Slackware64-14.2 (4.18.15) UEFI enabled
Posts: 500

Rep: Reputation: 171Reputation: 171
my system with several efi partitions
John

Last edited by AlleyTrotter; 09-21-2018 at 11:06 PM.
 
1 members found this post helpful.
Old 07-18-2018, 07:57 AM   #5
onebuck
Moderator
 
Registered: Jan 2005
Location: Summer Midwest USA, Central Illinois, Winter Central Florida
Distribution: SlackwareŽ
Posts: 13,225
Blog Entries: 29

Rep: Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429
Member response

Hi,

As requested;
Code:
~# LANG=POSIX fdisk -l -o device,size,type|grep ^/
/dev/sda1     20G Linux
/dev/sda2      4G Linux swap
/dev/sda3     20G Linux
/dev/sda4  421.8G Extended
/dev/sda5      6G Linux
/dev/sda6     20G Linux
/dev/sda7     20G Linux
/dev/sda8      2G Linux
/dev/sda9      4G Linux
/dev/sda10   123G Linux
/dev/sda11   123G Linux
/dev/sda12 123.8G Linux
/dev/sdb1  97.7G HPFS/NTFS/exFAT
/dev/sdb2  13.7G HPFS/NTFS/exFAT
buckXPS:~# lsblk -l -o vendor,model,name,parttype,uuid,pkname,tran,hotplug,fstype,type,size,mountpoint
VENDOR   MODEL            NAME  PARTTYPE UUID                                 PKNAME TRAN   HOTPLUG FSTYPE TYPE   SIZE MOUNTPOINT
ATA      CT500MX500SSD1   sda                                                        sata         0        disk 465.8G 
                          sda1  0x83     37839804-0a30-45d8-95a6-e52cb6bcafb2 sda                 0 ext4   part    20G 
                          sda2  0x82     f166766c-a759-4379-a4bd-c16b2d9f07a8 sda                 0 swap   part     4G [SWAP]
                          sda3  0x83     d3d0f94c-ccd4-49bc-8707-4c7c2f91ed14 sda                 0 ext4   part    20G 
                          sda4  0x5                                           sda                 0        part     1K 
                          sda5  0x83     e6076a4d-af35-4544-8b82-6356c8223fd6 sda                 0 ext4   part     6G /
                          sda6  0x83     7f43979b-d4a0-42a6-b6bb-d0e3aeb6a635 sda                 0 ext4   part    20G /home
                          sda7  0x83     0a806beb-8483-426c-956e-b26c424e1cfb sda                 0 ext4   part    20G /usr
                          sda8  0x83     6392bfc9-e0e0-412d-8582-109faf30bfda sda                 0 ext4   part     2G /var
                          sda9  0x83     920a3043-03c3-41f6-894b-beac9743a47d sda                 0 ext4   part     4G /tmp
                          sda10 0x83     3643ab75-f110-4655-9de8-ed2b67ccaa7f sda                 0 ext4   part   123G /arc1
                          sda11 0x83     d6ff2e5b-08bf-4445-b1f1-60bd033ce630 sda                 0 ext4   part   123G /arc2
                          sda12 0x83     18a8ed51-5dbe-4fe2-bf47-e9fcc0c60137 sda                 0 ext4   part 123.8G /arc3
ATA      WDC WD3200BPVT-7 sdb                                                        sata         0        disk 298.1G 
                          sdb1  0x7      8442AA3F42AA3638                     sdb                 0 ntfs   part  97.7G 
                          sdb2  0x7      803CABC83CABB814                     sdb                 0 ntfs   part  13.7G 
HL-DT-ST DVD+-RW GT32N    sr0                                                        sata         1        rom   1024M
Hope this helps.
Have fun & enjoy!
Attached Files
File Type: txt MyBlock.txt (2.7 KB, 3 views)

Last edited by onebuck; 07-18-2018 at 09:59 AM. Reason: add attachment
 
1 members found this post helpful.
Old 07-18-2018, 08:36 AM   #6
Mark Pettit
Member
 
Registered: Dec 2008
Location: Cape Town, South Africa
Distribution: Slackware 14.2 64 Multi-Lib
Posts: 517

Rep: Reputation: 199Reputation: 199
LANG=POSIX fdisk -l -o device,size,type|grep ^/
fdisk: invalid option -- 'o'
Usage:
fdisk [options] <disk> change partition table
fdisk [options] -l <disk> list partition table(s)
fdisk -s <partition> give partition size(s) in blocks

Options:
-b <size> sector size (512, 1024, 2048 or 4096)
-c[=<mode>] compatible mode: 'dos' or 'nondos' (default)
-h print this help text
-u[=<unit>] display units: 'cylinders' or 'sectors' (default)
-v print program version
-C <number> specify the number of cylinders
-H <number> specify the number of heads
-S <number> specify the number of sectors per track


lsblk -l -o vendor,model,name,parttype,uuid,pkname,tran,hotplug,fstype,type,size,mountpoint
lsblk: unknown column: vendor,model,name,parttype,uuid,pkname,tran,hotplug,fstype,type,size,mountpoint


cat /etc/slackware-version
Slackware 14.0
(this on a server at work with an interesting raid system - attotech)
 
1 members found this post helpful.
Old 07-18-2018, 08:44 AM   #7
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,521

Original Poster
Rep: Reputation: Disabled
@Mark: most probably options available in the versions of fdisk and lsblk utilities shipped in Slackware 14.2 were not available in Slackware 14.0. That's what was alluded in the original post writing "making use of tools providing features available relatively recently". Thanks for having tried, this seems to confirm that.

@All: I appreciate your contributions, please continue posting. I will comment after having gathered more examples, preferably as attached files.

Last edited by Didier Spaier; 07-18-2018 at 08:53 AM.
 
Old 07-18-2018, 09:34 AM   #8
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware14.2 64-Bit Desktop, Devuan 2.0 ASCII Toshiba Satellite Notebook
Posts: 2,605

Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
Quote:
Originally Posted by Didier Spaier View Post
Hello,

I am elaborating proposals to simplify the Slackware installer, making use of tools providing features available relatively recently.

One of these proposal is about probing the partitions on block devices. Currently this is done in the installer by the script /sbin/probe, which is run by several scripts in /usr/lib/setup. I attach it to this post (version found at time of writing in the compressed archive skeleton_initrd.tar.gz in the source of the installer for Slackware64-current). I am wondering if it would be possible nowadays to just replace it by a shell command using fdisk.

Also, I consider using lsblk to replace various utilities used by scripts in /usr/lib/setup/setup. This also needs testing on a wide range of devices and partitions types.

I need help to test with settings of devices that I do not have at hand. So, if you use specific devices or settings like:
  • Old IDE drives,
  • Raid devices, like Mylex RAID, Compaq SMART2 or any other kind,
  • ATA RAID,
  • CISS aka HP Smart Array,
  • LVM,
  • LUKS encrypted volumes,
  • Virtual partitions,
  • NVMe,
  • eMMC,
  • MD devices (software RAID),
  • Other kinds of devices partitions or settings I have never heard of or I forgot to mention,
please run the following commands as root in a running system and post the output in this thread, preferably as an attachment (file whose name ends in .txt) with relevant comments about the devices partitions and use case.


Code:
LANG=POSIX fdisk -l -o device,size,type|grep ^/
lsblk -l -o vendor,model,name,parttype,uuid,pkname,tran,hotplug,fstype,type,size,mountpoint
Thanks in advance for your cooperation.
LVM and LUKs caught my attention. Does this mean maybe there will be a slightly better way of handling that on Slackware? After reading both README_CRYPT and README_LUKs , my eyes glaze over. tl;dr, pretty much.

Screw it I'll just say it, I am too dumb and lazy to setup an encrypted LUKs on Slackware , and looking for something a bit easier

Last edited by Jeebizz; 07-18-2018 at 09:40 AM.
 
Old 07-18-2018, 09:53 AM   #9
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,521

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Jeebizz View Post
LVM and LUKs caught my attention. Does this mean maybe there will be a slightly better way of handling that on Slackware? After reading both README_CRYPT and README_LUKs , my eyes glaze over. tl;dr, pretty much.
That's not in the scope, rather the aim is to check what the installer would know about LUKS encrypted partition with such commands, in other words is it possible to change the way they are currently probed without losing information needed to handle them.

Quote:
Screw it I'll just say it, I am too dumb and lazy to setup an encrypted LUKs on Slackware , and looking for something a bit easier
As it happens some time ago I wrote a Wiki page for a friend on this topic. If you read French this could help you (it's applicable to Slackware as well), or even better translate it to English so it could be contributed to SlackDocs.
 
Old 07-18-2018, 09:57 AM   #10
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware14.2 64-Bit Desktop, Devuan 2.0 ASCII Toshiba Satellite Notebook
Posts: 2,605

Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
Quote:
Originally Posted by Didier Spaier View Post
That's not in the scope, rather the aim is to check what the installer would know about LUKS encrypted partition with such commands, in other words is it possible to change the way they are currently probed without losing information needed to handle them.
Oh, darn

Quote:
Originally Posted by Didier Spaier View Post
As it happens some time ago I wrote a Wiki page for a friend on this topic. If you read French this could help you (it's applicable to Slackware as well), or even better translate it to English so it could be contributed to SlackDocs.
I don't speak French, so I would be useless.
 
Old 07-18-2018, 10:04 AM   #11
onebuck
Moderator
 
Registered: Jan 2005
Location: Summer Midwest USA, Central Illinois, Winter Central Florida
Distribution: SlackwareŽ
Posts: 13,225
Blog Entries: 29

Rep: Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429
Member response

Hi,

Sorry about the posting of code block. I have edited my OP to add attachment.

Hope this helps.
Have fun & enjoy!
 
1 members found this post helpful.
Old 07-18-2018, 01:25 PM   #12
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 14.2 + Multilib
Posts: 1,425

Rep: Reputation: 830Reputation: 830Reputation: 830Reputation: 830Reputation: 830Reputation: 830Reputation: 830
Didier Spaier --

This is my Work Laptop.

-- kjh

Code:
# uname -a

Linux kjhlt6 4.4.141.kjh #1 SMP Tue Jul 17 12:06:16 CDT 2018 x86_64 Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz GenuineIntel GNU/Linux                                                                                

# LANG=POSIX fdisk -l -o device,size,type|grep ^/

/dev/sda1     4G Linux swap
/dev/sda2     1G Linux filesystem
/dev/sda3   850G Linux filesystem
/dev/sdc1   600M Windows recovery environment
/dev/sdc2   260M EFI System
/dev/sdc3   128M Microsoft reserved
/dev/sdc4   476G Microsoft basic data
/dev/sdd1   430G Linux filesystem
/dev/sdb1     4G Linux swap
/dev/sdb2   855G Linux filesystem

# lsblk -l -o vendor,model,name,parttype,uuid,pkname,tran,hotplug,fstype,type,size,mountpoint

VENDOR   MODEL            NAME PARTTYPE                             UUID                                 PKNAME TRAN   HOTPLUG FSTYPE TYPE   SIZE MOUNTPOINT
ATA      Samsung SSD 850  sda                                                                                   sata         0        disk 953.9G 
                          sda1 0657fd6d-a4ab-43c4-84e5-0933c84b4f4f 7b4dd804-8e8d-4862-a777-1744bf1ce4c4 sda                 0 swap   part     4G [SWAP]
                          sda2 0fc63daf-8483-4772-8e79-3d69d8477de4 5eee1fe7-ad47-4da0-9a45-c38925455165 sda                 0 ext4   part     1G /boot
                          sda3 0fc63daf-8483-4772-8e79-3d69d8477de4 e1781832-5e18-46a6-832f-17b7ca96c075 sda                 0 ext4   part   850G /
ATA      Samsung SSD 850  sdb                                                                                   sata         0        disk 953.9G 
                          sdb1 0657fd6d-a4ab-43c4-84e5-0933c84b4f4f 962d12e7-519d-42a2-958e-c8d0d1cdc6c5 sdb                 0 swap   part     4G [SWAP]
                          sdb2 0fc63daf-8483-4772-8e79-3d69d8477de4 5fe37a8b-5c03-4b12-937b-55adc8c744ad sdb                 0 ext4   part   855G /home
ATA      SAMSUNG MZHPV512 sdc                                                                                   sata         0        disk   477G 
                          sdc1 de94bba4-06d1-4d40-a16a-bfd50179d6ac 8A0CCE5C0CCE42C5                     sdc                 0 ntfs   part   600M 
                          sdc2 c12a7328-f81f-11d2-ba4b-00a0c93ec93b 8AD0-411D                            sdc                 0 vfat   part   260M 
                          sdc3 e3c9e316-0b5c-4db8-817d-f92df00215ae                                      sdc                 0        part   128M 
                          sdc4 ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 E61CD1121CD0DE9D                     sdc                 0 ntfs   part   476G 
ATA      SAMSUNG MZHPV512 sdd                                                                                   sata         0        disk   477G 
                          sdd1 0fc63daf-8483-4772-8e79-3d69d8477de4 5acd6282-c286-4d15-b06e-36420b030bc3 sdd                 0 ext4   part   430G /opt

# df -H

Filesystem      Size  Used Avail Use% Mounted on
tmpfs            34M  1.1M   33M   4% /run
devtmpfs        8.4M     0  8.4M   0% /dev
/dev/sda3       899G  368G  486G  44% /
tmpfs            34G  328k   34G   1% /dev/shm
cgroup_root      34G     0   34G   0% /sys/fs/cgroup
/dev/sda2       1.1G  607M  347M  64% /boot
/dev/sdb2       904G  591G  268G  69% /home
/dev/sdd1       455G  136G  296G  32% /opt
cgmfs           103k     0  103k   0% /run/cgmanager/fs
 
1 members found this post helpful.
Old 09-14-2018, 10:15 AM   #13
ivandi
Member
 
Registered: Jul 2009
Location: Québec, Canada
Distribution: SlackMATE on top of Slackware64-14.2
Posts: 470

Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
KVM UEFI virtio:
Code:
/dev/vda1   128M EFI System
/dev/vda2   128M Linux filesystem
/dev/vda3  15.8G Linux LVM
VENDOR   MODEL            NAME         PARTTYPE                             UUID                                   PKNAME TRAN HOTPLUG FSTYPE      TYPE   SIZE MOUNTPOINT
                          fd0                                                                                                        1             disk     4K 
QEMU     QEMU DVD-ROM     sr0                                               2018-09-14-01-16-13-00                        ata        1 iso9660     rom     58M 
QEMU     QEMU DVD-ROM     sr1                                                                                             ata        1             rom   1024M 
0x1af4                    vda                                                                                                        0             disk    16G 
                          vda1         c12a7328-f81f-11d2-ba4b-00a0c93ec93b 1587-9799                              vda               0 vfat        part   128M /boot/efi
                          vda2         0fc63daf-8483-4772-8e79-3d69d8477de4 31654a30-124c-476a-97f2-0023c4331fe9   vda               0 ext4        part   128M /boot
                          vda3         e6d6d379-f507-44c2-a23c-238f2a3df928 c8e94db0-892c-4d5c-9981-7b5942fc1129   vda               0 crypto_LUKS part  15.8G 
                          luksvda3                                          HkySdg-PAl4-pexG-EUMy-m4rT-OF3k-BW0eim vda3              0 LVM2_member crypt 15.8G 
                          cryptvg-swap                                      65f75b79-d6f4-4e72-8cc1-5e2dab209c36   dm-0              0 swap        lvm      1G [SWAP]
                          cryptvg-root                                      011a579e-71d6-486b-97b6-3ffed68ad476   dm-0              0 ext4        lvm   14.8G /
Attached Files
File Type: txt probe.txt (1.8 KB, 4 views)
 
1 members found this post helpful.
Old 09-14-2018, 11:50 AM   #14
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,521

Original Poster
Rep: Reputation: Disabled
Thanks ivandi. So /dev/vda1 should be detected as an ESP by the code snippet I posted here.

Last edited by Didier Spaier; 09-14-2018 at 12:21 PM.
 
Old 09-14-2018, 12:56 PM   #15
slac-in-the-box
Member
 
Registered: Mar 2010
Location: oregon
Distribution: slackware64-14.2
Posts: 267

Rep: Reputation: 109Reputation: 109
From a LUKS + LVM system:

Code:
bash-4.3# LANG=POSIX fdisk -l -o device,size,type|grep ^/
/dev/sda1    7.5G Linux
/dev/sda2    500M Linux
/dev/sda3  923.5G Linux
bash-4.3# lsblk -l -o vendor,model,name,parttype,uuid,pkname,tran,hotplug,fstype,type,size,mountpoint
VENDOR   MODEL        NAME         PARTTYPE UUID                                   PKNAME TRAN   HOTPLUG FSTYPE      TYPE    SIZE MOUNTPOINT
ATA      WDC WD1002FA sda                                                                 sata         0             disk  931.5G 
                      sda1         0x83     288c7bad-1a7a-457a-954d-55d3d9b76650   sda                 0 ext4        part    7.5G /seed
                      sda2         0x83     a8fcac2c-b93a-4043-a671-b441187da42d   sda                 0 ext4        part    500M /boot
                      sda3         0x83     0d351593-6148-40c3-afa5-385d20892618   sda                 0 crypto_LUKS part  923.5G 
                      lukssda3              c8dJAO-jx3B-xmuT-X3f8-Jkkp-eUDz-dDnDRx sda3                0 LVM2_member crypt 923.5G 
                      fullerz-root          ba454b97-8f71-4986-8e58-ea798e72a977   dm-0                0 ext4        lvm      64G /
                      fullerz-home          ea227665-a70e-44c0-8c3f-2bc5325473f4   dm-0                0 ext4        lvm   795.5G /home
                      fullerz-tmp           fe1c2a3c-414f-4777-925e-b14b88f597d7   dm-0                0 ext4        lvm      31G /tmp
                      fullerz-var           586cbfae-7925-407a-b029-84fc8b33fccd   dm-0                0 ext4        lvm      31G /var
                      fullerz-swap          ef609db7-0369-4f4e-8e93-f092821a77ff   dm-0                0 swap        lvm       2G [SWAP]
bash-4.3#

Last edited by slac-in-the-box; 09-14-2018 at 01:07 PM. Reason: corrected missing output
 
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
Slackware-current installer not picking up NTFS partitions Skaendo Slackware 8 10-29-2017 03:25 PM
Network Block Devices - what options on slackware? Slax-Dude Slackware 0 04-24-2011 09:32 AM
[SOLVED] when booting from PSlinuxOs 2009.1 cd - segmentation fault when probing scsi devices Gusmyster Linux - Newbie 2 01-01-2011 09:06 PM
[Drivers] probing I2C devices kamou Programming 0 03-13-2009 04:45 AM
Probing USB devices Cotobear Slackware 9 04-13-2008 04:05 PM

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

All times are GMT -5. The time now is 04:39 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration