LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 01-01-2024, 11:23 AM   #1
linuxbird
Member
 
Registered: Feb 2006
Distribution: Slackware
Posts: 543

Rep: Reputation: 36
Drive Sequence and boot drive, with expansion SATA board


With an old G41M motherboard, I have a system with drives going to the motherboard interface, and drives connected through an expansion board.

If I boot with a Slackware install USB, the drives on the expansion board are mounted "first", meaning they come up as sda, sdb, etc.

I would like for the drives on the motherboard to come up "first" and have those as sda, sdb, etc.

I know that I can edit the fstab and use UUID to control the assignment of drives with control of what partition goes where. However, with drives on the expansion board changing periodically, the administration of the UUIDs becomes a bit of a problem. I also understand that can reassign UUIDs to partitions, but again, I am trying to manage a large number of drives, and the administration becomes problematic.

Changing the "boot" order on the motherboard does not have an effect on this, and in fact the system apparently tries to boot off the first drive on the expansion board when drives are connected.

Any ideas? I would like the first SATA interface on the motherboard to be the one which the system boots from by default.

Edit: I am using LILO for the time being with this system.

Last edited by linuxbird; 01-01-2024 at 11:28 AM. Reason: LILO mention
 
Old 01-01-2024, 01:13 PM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,714

Rep: Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734
Device labels have been dynamic (meaning fluid and undependable) for a long time and there is no direct solution other than writing your own udev version that is not dynamic.
Dealing with that is, however, pretty easy. Using UUID is one way, and since both devices and partitions can be assigned a UUID that works pretty well and is the way most automated setups do things.
There is an older and more manual way, involving giving partitions (or, really, filesystems) a LABEL and then using that for LILO and FSTAB. I would think that that older way would fit SLACKWARE nicely, but I have not tested it. Were I you, I would look into that.
 
1 members found this post helpful.
Old 01-01-2024, 01:21 PM   #3
henca
Member
 
Registered: Aug 2007
Location: Linköping, Sweden
Distribution: Slackware
Posts: 992

Rep: Reputation: 674Reputation: 674Reputation: 674Reputation: 674Reputation: 674Reputation: 674
Do you know name/model of this "SATA expansion board"? The command "/sbin/lspci" might give some clue.

My guess is that the board itself has some kind of bios causing it to boot from its drives. Maybe, during boot, there is some key to press to get into that bios and disable booting from drives connected to the expansion board?

regards Henrik
 
1 members found this post helpful.
Old 01-01-2024, 02:03 PM   #4
linuxbird
Member
 
Registered: Feb 2006
Distribution: Slackware
Posts: 543

Original Poster
Rep: Reputation: 36
Marvel Technology Group 88SE9215, something like: Weastlinks PCI-E to 4 Ports SATA III 3.0 6G Controller Card Marvell 88SE9215 non raid pcie 2.0 x1 expansion card Low profile available at Newegg.

The board causes a pop-up during bios boot, but after (obviously) the motherboard boot.

I have not been able to keep the expansion board devices from ending up in the /dev/sda slot. If I disconnect the drives, boot, and then plug in the drives, I get the sequencing I need. Ultimately this machine will be remote, so manual intervention is not desirable. ha ha

Will look for some online docs for the chipset.
 
Old 01-01-2024, 02:12 PM   #5
linuxbird
Member
 
Registered: Feb 2006
Distribution: Slackware
Posts: 543

Original Poster
Rep: Reputation: 36
So a lookup in a similar Amazon listed product states that the 9215 works with Linux, but the 9230 does not, and the device disconnects. It also states that one cannot boot through this adapter. (I seem to recall using this adapter to boot a system in the past, so that may not be true.)

One question is: When does the kernel do the assignment of drives, and is there a flag anywhere to tack new drives on at the end of the drive list?

The drives show up as plugdev group, and I did a quick look through dmesg to see if there was any clue I could find there. The motherboard connected drives are shifted to later in the list. I can still boot from them (like /dev/sdd) but I end up booting with a USB and entering an incantation.
 
Old 01-01-2024, 02:17 PM   #6
linuxbird
Member
 
Registered: Feb 2006
Distribution: Slackware
Posts: 543

Original Poster
Rep: Reputation: 36
Quote:
Originally Posted by wpeckham View Post
Device labels have been dynamic (meaning fluid and undependable) for a long time and there is no direct solution other than writing your own udev version that is not dynamic.
Dealing with that is, however, pretty easy. Using UUID is one way, and since both devices and partitions can be assigned a UUID that works pretty well and is the way most automated setups do things.
There is an older and more manual way, involving giving partitions (or, really, filesystems) a LABEL and then using that for LILO and FSTAB. I would think that that older way would fit SLACKWARE nicely, but I have not tested it. Were I you, I would look into that.
I am not sure that approach will work, because as I understand it the fstab fires up after the kernel is loaded, and it appears that the drive sequence is somehow established by BIOS prior to the kernel being loaded. But I could be wrong, and I have not gone through the plethora of literature on how Linus boots up.

Right now, the only working workaround I have is to boot with drives attached to the motherboard SATA, and then afterwards, plug the additional drives into the SATA expansion board.
 
Old 01-01-2024, 02:29 PM   #7
linuxbird
Member
 
Registered: Feb 2006
Distribution: Slackware
Posts: 543

Original Poster
Rep: Reputation: 36
The Marvell chipset documentation does not provide any hints about changing the configuration. I will look further for a firmware document, but I kind of doubt I will find anything available relative to this thread.

https://www.marvell.com/content/dam/...et-2018-12.pdf
 
Old 01-01-2024, 02:30 PM   #8
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,714

Rep: Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734
Quote:
Originally Posted by linuxbird View Post
I am not sure that approach will work, because as I understand it the fstab fires up after the kernel is loaded, and it appears that the drive sequence is somehow established by BIOS prior to the kernel being loaded. But I could be wrong, and I have not gone through the plethora of literature on how Linus boots up.

Right now, the only working workaround I have is to boot with drives attached to the motherboard SATA, and then afterwards, plug the additional drives into the SATA expansion board.
There is a mapping set in the bios, but you rarely see that under Linux. When Linux loads the kernel loads (among other things) the UDEV subsystem early. UDEV detects the devices installed on the system and device events. "Udev identifies devices by serial numbers, manufacturers, and even vendor ID and product ID numbers." Once it detects a device it maps device paths and runs any defined init for it, which may trigget a device driver load form the kernel module libraries.

That subsystem is pretty critical, but messing with it IS possible. (See articles like https://opensource.com/article/18/11/udev which I quoted above. )
 
1 members found this post helpful.
Old 01-02-2024, 01:20 AM   #9
henca
Member
 
Registered: Aug 2007
Location: Linköping, Sweden
Distribution: Slackware
Posts: 992

Rep: Reputation: 674Reputation: 674Reputation: 674Reputation: 674Reputation: 674Reputation: 674
So, we have two different problems here...

The drive order sda, sdb and so on might be possible to fix with udev, just like you can use udev to configure the order of network cards eth0, eth1...

However, the boot order cannot be fixed by udev as linux has not yet been started at boot. As you say, the expansion card does not mention any way to disable boot, it only seems to present some more drives to your computer. If so, you are left to the functionality of the motherboard bios to choose boot drive. As a last resort you might see if it helps to move the expansion card to another PCI slot.

I did google the manual for the G41M motherboard, but it does not provide any block diagram showing how north bridgh, south bridge, build in SATA controllers and PCI lanes are connected.

Did you try messing with those BIOS settings for "On-Chip SATA Mode" and "SATA Port 0/2 Set to"? Maybe if you configure the onboard drives to act as IDE drives they will be selected for boot?

regards Henrik
 
Old 01-31-2024, 04:04 PM   #10
linuxbird
Member
 
Registered: Feb 2006
Distribution: Slackware
Posts: 543

Original Poster
Rep: Reputation: 36
I still have the same problem, but perhaps I have a different explanation of it. Kindly consider:

Changing drives installed on the system changes /dev/sda2. I cannot get around this.

So what I thought I would do is to try to use UUID specifications instead of the /dev/sda2.

I am having some trouble with this. Probably because I don't completely understand the boot process and what lilo does.

Q1: Do I need a boot = near the top of the lilo.conf?

Q2: If I need a boot = line, can it be done with UUID?

Q3: Where the per image entries are in lilo.conf, can I use a UUID specification?

Thanks.
 
Old 01-31-2024, 08:53 PM   #11
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
I think giving partition name scheme as suggested by wpeckham could be a workable strategy if you have many drives
For example give each drive a name, then choose a partition name and combine them for the filesystem label
Like: SAM1-SLKHOME (Samsung hard drive number 1, Slackware /home partition), you could even physically put a label sticker with "SAM1" on the drive
 
Old 02-01-2024, 07:25 AM   #12
linuxbird
Member
 
Registered: Feb 2006
Distribution: Slackware
Posts: 543

Original Poster
Rep: Reputation: 36
Quote:
Originally Posted by keefaz View Post
I think giving partition name scheme as suggested by wpeckham could be a workable strategy if you have many drives
For example give each drive a name, then choose a partition name and combine them for the filesystem label
Like: SAM1-SLKHOME (Samsung hard drive number 1, Slackware /home partition), you could even physically put a label sticker with "SAM1" on the drive
As I understand it, udev can be very helpful, and is probably underutilized for managing fs and related events. However, I believe that it needs a kernel operating to run.

Specifically, I am trying to direct where the drive and kernel are to boot up, after which udev could be used. But I need to assign a root partition and get a kernel loaded first.
 
Old 02-01-2024, 10:59 AM   #13
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,714

Rep: Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734
Using labels, or using UUID strings, allow the BOOT MANAGER to identify the devices the way you want them to. It also helps the KERNEL identify them the way you want them to. Directing the boot process before the kernel loads is the job of the BOOT MANAGER (grub2 and elilo are most common) and these suggestions directly affect the way you would configure those and the way they would work for you.

If you find another way using udev directly, I will look forward to seeing that procedure documented.
 
Old 02-01-2024, 11:55 AM   #14
linuxbird
Member
 
Registered: Feb 2006
Distribution: Slackware
Posts: 543

Original Poster
Rep: Reputation: 36
Quote:
Originally Posted by wpeckham View Post
Using labels, or using UUID strings, allow the BOOT MANAGER to identify the devices the way you want them to. It also helps the KERNEL identify them the way you want them to. Directing the boot process before the kernel loads is the job of the BOOT MANAGER (grub2 and elilo are most common) and these suggestions directly affect the way you would configure those and the way they would work for you.

If you find another way using udev directly, I will look forward to seeing that procedure documented.
Assuming I am using lilo, can you answer the following questions?

Q1: Do I need a boot = near the top of the lilo.conf?

Q2: If I need a boot = line, can it be done with UUID?

Q3: Where the per image entries are in lilo.conf, can I use a UUID specification?
 
Old 02-01-2024, 01:25 PM   #15
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,797

Rep: Reputation: 4436Reputation: 4436Reputation: 4436Reputation: 4436Reputation: 4436Reputation: 4436Reputation: 4436Reputation: 4436Reputation: 4436Reputation: 4436Reputation: 4436
Even if there's no fix in the BIOS, it seems to me there is no need to be concerned which drive/mbr LILO is installed on if it's menu config'd for

Code:
other - dev/foo
 label = Foo
 
  


Reply



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
MZHOU PCIe SATA Card 2 Port - PCI Express SATA 3.0 GEN3 Expansion Card - 6 Gbp/s SATA Controller Expansion Cards with Low-Profile Bracket (C drmozes Slackware - ARM 4 04-19-2023 07:44 PM
LXer: Longtime Mozilla board member Bob Lisbonne moves from Foundation to Corporate Board; Outgoing CEO Chris Beard Corporate Board Term End LXer Syndicated Linux News 0 10-24-2019 10:03 PM
variable expansion and pathname expansion ShadeLover Linux - General 6 04-22-2015 10:56 PM
Error trying to configure the touch screen on the Beagle Board XM Expansion Board marietto Linux - Hardware 0 06-30-2011 02:37 PM
RAID 1 hard drive choice and sata expansion issue macdudeosx Linux - Hardware 1 03-07-2011 07:00 PM

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

All times are GMT -5. The time now is 04:13 PM.

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