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 09-03-2019, 05:21 PM   #16
thirdm
Member
 
Registered: May 2013
Location: Massachusetts
Distribution: Slackware, OpenBSD
Posts: 140

Rep: Reputation: Disabled

This is set SOLVED. Was it caused by the change-rules section as enorbet suggested? How exactly? Without the default change rules sda6 is named sda1?

lsblk has a -f argument that causes the filesystem present on a partition to be shown. That might have been useful to defend the claim that sda1 didn't have a file system (if that's what was meant by empty).
 
Old 09-03-2019, 06:45 PM   #17
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.2
Posts: 3,416

Rep: Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759
Quote:
Originally Posted by Nick-us View Post
With all the above information.
Could anyone explain how what happened was possible?
Did fstab really link from sda1 to sda6?
I know we solved the problem by finding the error in fstab. But I just would like to understand what happened.
fstab is not used to mount the root partition. Ever.

The /etc directory is almost always part of the root partition; otherwise, you would have to mount the partition with '/etc' directory first simply to read fstab! If that directory is part of the root partition, you would have to mount the root partition to read fstab.

(It is possible to mount /etc on its own partition, but that so unusual in these modern times that you would have to modify some of the startup scripts to do so. Same goes for /usr.)

Your lilo (or grub) configuration is what sets your root partition.
 
1 members found this post helpful.
Old 09-03-2019, 07:24 PM   #18
Nick-us
Member
 
Registered: Feb 2019
Distribution: Slackware64-Current
Posts: 33

Original Poster
Rep: Reputation: 7
Quote:
Originally Posted by enorbet View Post
I wonder if this is the cause (emboldened)...

Code:
change-rules
  reset
What generated the confusion was because in lilo I defined sda6 but in fstab I asked to mount in sda1. As I showed when you asked for more information.

As for what you selected in lilo, I don't really know what this line does. But I always used it like this
 
Old 09-03-2019, 07:27 PM   #19
Nick-us
Member
 
Registered: Feb 2019
Distribution: Slackware64-Current
Posts: 33

Original Poster
Rep: Reputation: 7
Quote:
Originally Posted by Richard Cranium View Post
fstab is not used to mount the root partition. Ever.

The /etc directory is almost always part of the root partition; otherwise, you would have to mount the partition with '/etc' directory first simply to read fstab! If that directory is part of the root partition, you would have to mount the root partition to read fstab.

(It is possible to mount /etc on its own partition, but that so unusual in these modern times that you would have to modify some of the startup scripts to do so. Same goes for /usr.)

Your lilo (or grub) configuration is what sets your root partition.
Interesting argument. Also because it was working on sda6 anyway. Although the system eventually reported sda1 because of fstab
 
Old 09-03-2019, 07:35 PM   #20
Nick-us
Member
 
Registered: Feb 2019
Distribution: Slackware64-Current
Posts: 33

Original Poster
Rep: Reputation: 7
Quote:
Originally Posted by thirdm View Post
This is set SOLVED. Was it caused by the change-rules section as enorbet suggested? How exactly? Without the default change rules sda6 is named sda1?

lsblk has a -f argument that causes the filesystem present on a partition to be shown. That might have been useful to defend the claim that sda1 didn't have a file system (if that's what was meant by empty).
As I explained. What I understood is that lilo correctly mounted the partition on sda6. But fstab passed the information to the system that would be mounted on sda1.

sda1 was empty. Completely empty. It was just formatted with ext4 but there was no file. That can say 100% because I saw that it was mounted on sda1.

I used a LiveCD to check. A LiveCD does not use anything on the system, so I can guarantee that the void information is real. The only partition with system and files was sda6.

The other partitions reported though with files have nothing to do with the problem. They are partitions of personal files. and Windows.

Also as I informed. Even if fstab passed the system wrong information, even the partition data was from sda6 and never from sda1, lsblk reported and registered as sda1 but physically it was not.
 
Old 09-03-2019, 07:37 PM   #21
Nick-us
Member
 
Registered: Feb 2019
Distribution: Slackware64-Current
Posts: 33

Original Poster
Rep: Reputation: 7
Quote:
Originally Posted by Richard Cranium View Post
fstab is not used to mount the root partition. Ever.
Good to know that.
 
Old 09-03-2019, 07:49 PM   #22
Nick-us
Member
 
Registered: Feb 2019
Distribution: Slackware64-Current
Posts: 33

Original Poster
Rep: Reputation: 7
To help anyone reading the topic!
I marked as resolved because:
The error I discovered after Labinnah asked me for some commands was:

in MBR created by lilo, I informed that the system was in sda6.
But I wrote in fstab that the system was on sda1.
That's why the information given was completely crazy.

This error was caused because I moved all sda1 files. Where the system worked before. I left sda1 empty. And the files in sda6.
So to work, I just set lilo to sda6. And I forgot to do the same on fstab.

By the time I fixed my fstab stating that / is on sda6 the problem is over.

The curiosity of the subject is just because the system worked! It took me 4 days to realize that I was wrong.

I noticed something was wrong when I wanted to mount sda1 and the system reported that it was already mounted! And mounted strangely! Mounted as my system, where he was there.

I hope this explanation helps or clarifies everyone
 
1 members found this post helpful.
Old 09-04-2019, 12:59 AM   #23
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys for decades while testing others to keep up
Posts: 2,380

Rep: Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389
Regarding this issue, I actually think it was the combination of /etc/fstab and etc/lilo.conf that led to the craziness. I don't see how fstab alone could have created that particular confusion. I wonder when, where, and why you evewr started using "change rules \ reset". You were indeed lucky it worked at all and it may well be that the conflict may have been "fixed" by tyhose two entries in lilo.conf but it really isn't wise to enable features in any bootloader one does not understand.

If it was my box I would try commenting out those two lines (now that fstab is correct). I love LILO and have been using it for over 20 years and multi-booting for 30. I even install it on distros that do not even offer LILO as an option (no package available). I currently have 3 boxen that run regularly (one, constantly) each with at least 4 operating systems on them and I have never, not once, needed "change rules" as a LILO option. Perhaps at one time you had a problem that someone helped you with by saying "do this..." and you "painted by numbers" and have forgotten why, but "change rules" is not passive. It literally alters the attributes code defining partition type. It can hide and unhide a partition by it's switches, and in a worst case scenario could create considerable problems.

My take... if you don't need it, don't use it. If you think you do need it, confirm why. Don't do guesswork in things as potent as bootloaders. Since I have never actually used that option I could be mistaken about it's potential danger but because I don't use it, that doesn't matter. That you do use it implies you really do need to understand it's capabilities. It could be viewed as an "If it ain't broke, don't fix it" situation, but it is a potential vulnurability possibly something akin to getting snakes to "fix" a rodent problem. Once the rodents are gone, you might want to remove the snakes, especially if you don't even know for certain if they are poisonous or not. All I'm saying is Find Out!
 
Old 09-04-2019, 06:49 PM   #24
Nick-us
Member
 
Registered: Feb 2019
Distribution: Slackware64-Current
Posts: 33

Original Poster
Rep: Reputation: 7
Quote:
Originally Posted by enorbet View Post
Regarding this issue, I actually think it was the combination of /etc/fstab and etc/lilo.conf that led to the craziness. I don't see how fstab alone could have created that particular confusion. I wonder when, where, and why you evewr started using "change rules \ reset". You were indeed lucky it worked at all and it may well be that the conflict may have been "fixed" by tyhose two entries in lilo.conf but it really isn't wise to enable features in any bootloader one does not understand.
I don't think it was luck! On the contrary, I think none of this was random.
You can do the same yourself. Use a virtual machine and run the same as I did vove will see what happens. It was no chance or luck. and you configure lilo for one partition and ftab for another will happen exactly what happened to me

As for the "change rules \ reset" command, I didn't put it there. This is Slackware64 default this is already set by default in Slackware.

I'm not activating a feature I don't understand. I kept the default lilo.conf and just added my lines.
"change rules \ reset" is lilo.conf default Slackware64-Current

Do a fresh install of slackware and you will see that these lines will be there.

I learn slowly. So before I change anything that already exists, I first try to know about it. And as I told you, I don't know what this command does. That's why I never changed those lines. Just left it as it came with the system.
 
Old 09-05-2019, 05:33 PM   #25
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys for decades while testing others to keep up
Posts: 2,380

Rep: Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389
Interesting. My Current install is from April and the /etc/lilo.conf.example file has no mention of "change rules" or "reset" whatsoever.
 
Old 09-05-2019, 06:07 PM   #26
TheRealGrogan
Member
 
Registered: Oct 2010
Location: Ontario, Canada
Distribution: Slackware, Manjaro (for gaming)
Posts: 129

Rep: Reputation: 106Reputation: 106
The "change-rules reset" command is to prevent lilo from writing to the partition tables by default. Slackware has been adding that to lilo.conf for eons. change-rules reset with no additional change-rules specified means "no change rules" (not even the defaults).
 
Old 09-06-2019, 05:15 AM   #27
Nick-us
Member
 
Registered: Feb 2019
Distribution: Slackware64-Current
Posts: 33

Original Poster
Rep: Reputation: 7
Quote:
Originally Posted by enorbet View Post
Interesting. My Current install is from April and the /etc/lilo.conf.example file has no mention of "change rules" or "reset" whatsoever.
Interesting also this difference of files. I will show below the default for the 2 files, they are different.

lilo.conf default It has change-rules reset (This lilo.conf is generated when Slackware is installed just by pressing ENTER without modifying anything)
Code:
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
# Append any additional kernel parameters:
append=" "

boot = /dev/sda
#compact        # faster, but won't work on all systems.

# Boot BMP Image.
# Bitmap in BMP format: 640x480x8
  bitmap = /boot/slack.bmp
# Menu colors (foreground, background, shadow, highlighted
# foreground, highlighted background, highlighted shadow):
  bmp-colors = 255,0,255,0,255,0
# Location of the option table: location x, location y, number of
# columns, lines per column (max 15), "spill" (this is how many
# entries must be in the first column before the next begins to
# be used. We don't specify it here, as there's just one column.
  bmp-table = 60,6,1,16
# Timer location x, timer location y, foreground color,
# background color, shadow color.
  bmp-timer = 65,27,0,255

# Standard menu.
# Or, you can comment out the bitmap menu above and 
# use a boot message with the standard menu:
#message = /boot/boot_message.txt

# Wait until the timeout to boot (if commented out, boot the
# first entry immediately):
prompt
# Timeout before the first entry boots.
# This is given in tenths of a second, so 600 for every minute:
timeout = 1200
# Override dangerous defaults that rewrite the partition table:
change-rules
  reset
# Normal VGA console
vga = normal
# Ask for video mode at boot (time out to normal in 30s)
#vga = ask
# VESA framebuffer console @ 1024x768x64k
#vga=791
# VESA framebuffer console @ 1024x768x32k
#vga=790
# VESA framebuffer console @ 1024x768x256
#vga=773
# VESA framebuffer console @ 800x600x64k
#vga=788
# VESA framebuffer console @ 800x600x32k
#vga=787
# VESA framebuffer console @ 800x600x256
#vga=771
# VESA framebuffer console @ 640x480x64k
#vga=785
# VESA framebuffer console @ 640x480x32k
#vga=784
# VESA framebuffer console @ 640x480x256
#vga=769
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
  root = /dev/sda1
  label = Linux
  read-only
# Linux bootable partition config ends
lilo.conf_example default There is not change-rules reset
Code:
# /etc/lilo.conf  -   systemwide LILO configuration (LILO 24)
# details see in manpages: lilo(8) and lilo.conf(5)

# +-------------------------------------------------------------+
# |                        !! Reminder !!                       |
# |                                                             |
# | Don't forget to run 'lilo' after you make changes to this   |
# | conffile or you have installed a new kernel.                |
# +-------------------------------------------------------------+


# #################### LILO global section ######################

# With all newer systems (until year 2004) you can use the RAM
# above 15 MB. This option allows the use of this range of RAM.
#large-memory

# With all newer systems you can boot from any partition on disks 
# with more than 1024 cylinders. This option allows the use of 
# partitions above 1024 cylinders.
lba32

# Defines the boot device.  This is where Lilo installs its boot
# block.  It can be either a partition, or the raw device, in which
# case it installs in the MBR, and will overwrite the current MBR.
# With newer kernel you should use the ID of the boot device, which
# can be found here: /dev/disks/by-id/ata*.
boot = /dev/sda

# Defines the partition which is the root partition. This partition
# will be mounted at first from the kernel. With newer kernel you
# should use the UUID (UUID="...") of the root device, which can be
# found here: /dev/disks/by-uuid/*.
root = /dev/sda1

# This option may be needed for some software RAID installs.
#raid-extra-boot = mbr-only

# Enable map compaction.  This tries to merge read requests for 
# adjacent sectors into a single read request. This drastically 
# reduces load time and keeps the map smaller.  Using 'compact' 
# is especially recommended when booting from a floppy disk.  
# It is disabled here by default because it doesn't always work.
#compact

# Set the verbose level for bootloader installation. Value range:
# 0 to 5. Default value is 0.
#verbose = 1

# Specifies the location of the map file. Lilo creates the (sector) 
# map file of direct sector addresses which are independent of any
# filesystem.
map = /boot/map

# ---------------------------------------------------------------

# Specifies the menu interface. You have the choice between:
#   text: simple text menu with black background and white text
#   menu: configurable text menu with background and text colors.
#   bmp:  graphical menu with 640x480 bitmap background.
install = menu

# A) Customized boot message for choice 'text'.
# For the simple text menu you can set an extra message in the 
# created file. Its text will be displayed before boot prompt.
#message = /boot/message.txt

# B) Configuration of the scheme for choice 'menu'.
# Use following coding: <text>:<highlight>:<border>:<title>
# The first character of each part sets the text frontcolor, 
# the second character of earch part sets the text backcolor,
# an upper-case character sets bold face text (frontcolor).
#
# E.g. 'menu-scheme=wm:rw:wm:Wm'. Possible colors: 
# k=black, b=blue, g=green, c=cyan, r=red, m=magenta, y=yellow, w=white.
menu-scheme = Wb:Yr:Wb:Wb
#menu-title = " DESDEMONA Boot-Manager "

# C) Configuration of the image for choice 'bmp'.
# For the graphical menu you need a bitmap file, which needs a special
# menu configuration in the file header (see: lilo -E). Ideally you 
# use one of the delivered images of the lilo package.
#   with 16 colors:    onlyblue, tuxlogo, inside
#   with 256 colors:   coffee
#   for Debian:        debianlilo, debian, debian-de
#bitmap = /boot/tuxlogo.bmp

# ---------------------------------------------------------------

# Specifies the number of deciseconds (0.1 seconds) how long LILO 
# should wait before booting the first image.  LILO doesn't wait if
# 'delay' is omitted or set to zero. You do not see the defined menu.
#delay = 20

# Prompt to start one certain kernel from the displayed menu.
# It is very recommeded to also set 'timeout'. Without timeout boot 
# will not take place unless you hit return. Timeout is the number
# of deciseconds (0.1 seconds) after there the default image will 
# be started. With 'single-key' alias numbers for each menu line can
# be used.
prompt
timeout = 100
#single-key

# ---------------------------------------------------------------

# Specifying the VGA text mode that should be selected when booting.
# The following values are recognized (case is ignored):
#   vga=normal    80x25 text mode (default)
#   vga=extended  80x50 text mode (abbreviated to 'ext')
#   vga=ask       stop and ask for user input: choice of text mode
#   vga=<mode>    use the corresponding text mode number. A list of  
#                   available modes can be obtained by booting with  
#                   'vga=ask' and then pressing [Enter].
#
# Another way is the use of frame buffer mode. Then the kernel 
# will switch from the normal vga text mode (80x25) to the frame
# buffer <mode> (if frame buffer support is in the kernel):
#                   16bit:    32bit:
#     640x480 :     0x311     0x312
#     800x600 :     0x314     0x315
#    1024x768 :     0x317     0x318
#    1280x960 :     0x365     0x366
#    1280x1024:     0x31A     0x31B
#    1400x1050:     0x345     0x346
#    1600x1200:     0x333     0x334
#    1680x1050:     0x3D2     0x3D4
#    1920x1440:     0x337     0x338
#vga = ask
vga = normal
#vga = 0x317

# ---------------------------------------------------------------

# Set a password here and uncomment the 'restricted' lines in
# the image definitions below. Then a password must be typed
# to boot anything but a default configuration. If a command
# line is given, other than one specified by an 'append'
# statement in this lilo.conf, the password is required, but
# a standard default boot will not require one.
#
# If anyone have access to the console, with this password and
# the 'restricted' option you prevent booting with something
# like 'Linux init=/bin/sh' and thus becoming `root' without
# proper authorization.
#password = count4this

# Kernel command line options that apply to all installed images go
# here.  See 'kernel-parameters.txt' in the Linux kernel 'Documentation'
# directory. I.g. for start into 'init 5' write:  append="5"
#append = ""
 
# If you used a serial console to install Debian, this option should be
# enabled by default.
#serial = 0,9600

# Set the image which should be started after delay or timeout.
# If not set, the first defined image will be started.
#default = Linux


# ################### LILO per-image section ####################

# Each image is configured with the linux kernel (=image) and
# usually with the initrd file. Configure all GNU/Linux systems
# on other partitions, too.

# Warning: labels must be less than 16 characters long.

# first example (default)
image = /boot/vmlinuz-3.12-1-generic
	label = "Linux"
#	root = /dev/sda2
	read-only
#	restricted
#	alias = 1
#	optional
	initrd = /boot/initrd.img-3.12-1-generic

# second example
image = /boot/vmlinuz-2.6.32-1-generic
	label = "Linux OLD"
#	root = /dev/sdb1
	read-only
#	restricted
#	alias = 2
	optional
	initrd = /boot/initrd.img-2.6.32-1-generic

# third example
image = /mnt/testsystem/boot/vmlinuz-2.6.26-1-custom
	label = "Testsystem"
#	root = /dev/sda3
	read-only
#	restricted
#	alias = 3
	optional
	initrd = /mnt/testsystem/boot/initrd.img-2.6.26-1-custom

# other examples
# Booting other OS on this machine must set with 'other'. Changing 
# the device name on the `other' line to the partition of your other 
# system.

other = /dev/sda1
	label = "MS-Windows"
#	restricted
#	alias = 4

other = /dev/sdb2
	label = "GNU/Hurd"
#	restricted
#	alias = 5

other = /dev/sdb3
	label = "FreeBSD"
#	restricted
#	alias = 6
	boot-as = 0x80

Last edited by Nick-us; 09-06-2019 at 05:18 AM. Reason: Added more info
 
1 members found this post helpful.
Old 09-06-2019, 06:05 AM   #28
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys for decades while testing others to keep up
Posts: 2,380

Rep: Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389
Ah OK that makes sense now as I always opt for manual expert install of LILO and I don't ever run "liloconfig". Still I suggest looking into "change rules" lilo option to understand what it does. It is dependent on several other options but I can tell you for certain that the many dozens of linux installs I have made over 20+ years has never had a "change rules" option and they all work(ed).

As a result of this thread I will look further into it to see if it can solve minor detection balks I sometimes see in adding other systems to my Main LILO. One example would be where upon running /sbin/lilo it complains about a perfectly healthy Table or refuses to add a bootable partition. In the latter case I have used numerous recovery disks like Hirens and tried several generic bootloaders like PLOP which just by choosing drive/partition that partition that LILO will not accept, boots just fine.
 
  


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
Are You Kidding? Is This Crazy or am I Crazy? Unattended-upgrades happydog500 Linux - Security 13 01-20-2017 07:26 AM
Going crazy with crazy contact lenses puffaddering Linux - Certification 1 07-29-2007 08:42 PM

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

All times are GMT -5. The time now is 12:24 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