LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-28-2018, 05:14 PM   #1
OSBuildX
LQ Newbie
 
Registered: Oct 2018
Location: Finland
Distribution: debian, arch, you name it.
Posts: 14

Rep: Reputation: Disabled
Question Live-boot (debian) secondary mount parameter for kernel?


Figured lets start with something "easy".

hardware:
- Laptops/Desktops, new and old machines.
- USB HDD (with UAS, USB-to-SCSI) or USB stick.
- USB 2.0 (using USB 2.0 hub since never sure about compatibility over USB 3.0/3.1)

Partitioning:
1#: Primary (FAT16, active, bootable, grub4dos)
#: Extended Partition
5#: Logical (FAT32)
6#: Logical (NTFS)
7#: Logical (NTFS)


bootloader / OS: G4D (0.4.6a), Debian Live Stretch 9.5.0

Example (boot from ISO):
Code:
kernel (hd0,5)/LIVE/vmlinux boot=live components findiso=/LIVE/live.iso nopersistence noeject
initrd (hd0,5)/LIVE/initrd.img
(can also use fromiso=/dev/sda6/LIVE/live.iso which makes no difference except being faster maybe)

Example (boot from logical partition directly):
Code:
kernel (hd0,5)/LIVE/vmlinux boot=live components bootfrom=/dev/sda6 nopersistence noeject
initrd (hd0,5)/LIVE/initrd.img

Now there's 2 problems here:
1. Either initramfs fails or debian doesn't know what FAT16. (Mounting of /dev/sda1 fails as it some magical way attemps to mount it as ext4, if I view /etc/fstab at live system. Remounting is possible using vfat type.)
2. Mounting 3rd logical (or primary) NTFS partition at /dev/sda7 fails. ntfs-3g fails to mount it so does "mount -t ntfs ..."

Question:

Is there anyway to pass mount parameters to kernel at command-line ?

- I know fromiso/findiso mounts the partition with ISO/SquashFS at '/lib/live/media/fromiso' Read-Writable as root. So, can I also somehow pass parameter to kernel/initramfs to mount 3rd logical partition the same way?
Example: somepath=/dev/sda7 (which would also appear at /lib/live/media/somepath
- As for boot partition identified as ext4, well would be also nice to pass parameters, so, it would be identified as vfat (or FAT16).
 
Old 10-28-2018, 05:34 PM   #2
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,831
Blog Entries: 1

Rep: Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069
It looks to me like you're being thrown off by the HD becoming sdb when you boot from USB. What is the actual output from
Code:
fdisk -l
(placed here within code tags) booted from your Linux USB?
 
Old 10-28-2018, 05:55 PM   #3
OSBuildX
LQ Newbie
 
Registered: Oct 2018
Location: Finland
Distribution: debian, arch, you name it.
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by mrmazda View Post
It looks to me like you're being thrown off by the HD becoming sdb when you boot from USB.
Well, actually I removed all HDs from the test machine and that's why the USB-HDD with SCSI controller is detected as /dev/sdaX



fdisk -l (booted from ISO as desc. above):

Code:
user@debian:~$ sudo fdisk -l
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 byte
Disklabel type: dos
Disk identifier: 0x8bf95b60

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1  *         2048   1030143   1028096   502M  6 FAT16
/dev/sda2         1030176 976771071 975740896 465.3G  f W95 Ext'd (LBA)
/dev/sda5         1030207  66584575  65554369  31.3G  b W95 FAT32
/dev/sda6        66584640 335019509 268434870   128G  7 HPFS/NTFS/exFAT
/dev/sda7       335022080 976771071 641748992   306G  7 HPFS/NTFS/exFAT


Disk /dev/loop0: 2.6 GiB, 2800257024 bytes, 5469252 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 2.6 GiB, 2762993664 bytes, 5396472 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

blkid:
Code:
user@debian:~$ sudo blkid
/dev/sda1: SEC_TYPE="msdos" LABEL="BT" UUID="F123-2F00" TYPE="vfat" PARTUUID="8bf95b60-01"
/dev/sda5: LABEL="TOOLS" UUID="3E9F-9C00" TYPE="vfat" PARTUUID="8bf95b60-05"
/dev/sda6: LABEL="LINUX" UUID="01D46965E7C640D0" TYPE="ntfs" PARTUUID="8bf95b60-06"
/dev/sda7: LABEL="STORAGE" UUID="01D4680F765A1400" TYPE="ntfs" PARTUUID="8bf95b60-07"
/dev/loop0: UUID="2018-10-28-15-22-16-" LABEL="DEBIAN" TYPE="iso9660"
/dev/loop1: TYPE="squashfs"

/etc/fstab looks like this (FAT16 error):
Code:
proc /proc proc defaults 0 0
/dev/sda1 / ext4 errors=remount-ro 0 1
overlay / overlay rw 0 0
tmpfs /tmp tmpfs nosuid,nodev 0 0
-Above /dev/sda1 is incorrectly detected as EXT4.

Mounting /dev/sda7 error:
Code:
user@debian:~$ mkdir $HOME/storage 
user@debian:~$ sudo mount -t "ntfs" "/dev/sda7" "/$HOME/storage"
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 65535: Invalid argument
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 65535: Invalid argument
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 65535: Invalid argument
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 65535: Invalid argument
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 65535: Invalid argument
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 65535: Invalid argument
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 65535: Invalid argument
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 65535: Invalid argument
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 65535: Invalid argument
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 65535: Invalid argument
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 65535: Invalid argument
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 65535: Invalid argument
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 65535: Invalid argument
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 65535: Invalid argument
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 65535: Invalid argument
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 65535: Invalid argument
$MFTMirr does not match $MFT (record 16).
Failed to mount '/dev/sda7': Input/output error
NTFS is either inconsistent, or there is a hardware fault, or it's a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows twice. The usage of the /f parameter is very
important! If the device is a SoftRAID/FakeRAID then first activate
it and mount a different device under the /dev/mapper/ directory, (e.g.
/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
for more details.
-Above mount has been tested with 3 different HDs (1 cloned, 2 completely reformatted) and 1 USB stick I got here for testing. So, I kinda doubt it would be hardware error which I assumed at first.

Last edited by OSBuildX; 10-28-2018 at 06:18 PM.
 
Old 10-28-2018, 09:04 PM   #4
OSBuildX
LQ Newbie
 
Registered: Oct 2018
Location: Finland
Distribution: debian, arch, you name it.
Posts: 14

Original Poster
Rep: Reputation: Disabled
There seems to be one solution I just tested that will work, repartitioning:

/dev/sda
1#: Primary (FAT16, active, bootable, grub4dos)
#: Extended Partition
5#: Logical (FAT32)
6#: Logical (NTFS)
7#: Logical (NTFS)
8#: Logical (EXT4/NTFS/FAT32) <- Minimal /LIVE (ISO or extracted vmlinuz/initrd/squashfs).

Not a perfect, but at least I can mount/see all partitions now. Not counting:
- Still have to remount /dev/sda1 at system. *some bug in latest initramfs/kernel*
- Original problem of this post is just moved to last partition. Problem persist still of having partition containing files for live-boot at RO mode and readable only by root.
 
  


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
Can't mount CD-ROM after passed hdc=ide-scsi parameter to kernel ! nykey Slackware 9 06-03-2006 08:55 PM
cannot mount already formatted secondary hard drive on newly installed debian angmar Debian 8 08-05-2005 01:12 PM
How can I mount my secondary hard drive on boot? Scorlibrian Linux - Hardware 1 02-26-2005 11:36 AM
Information on boot parameter Debian/Sparc NeeD_ResT Solaris / OpenSolaris 2 11-23-2004 09:02 AM
Information on boot parameter Debian/Sparc NeeD_ResT Debian 0 09-29-2004 12:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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