• labels

    From faeychild@2:250/1 to All on Sat Aug 31 06:00:29 2019


    Of course I have none, and Bits has supported the cause for some time.

    So a bit of google turned a howto page. It seems quite simple.

    The page suggests

    e2label /dev/sda1 Boot
    OR
    # tune2fs -L Boot /dev/sda1

    The page does not say that it can't be done on a running system.

    Is it safe to do so?

    It does also say that

    mkfs.ext4 /dev/sda1 -L ROOT

    can also be done but not on existing partitions with a file system -
    obviously

    regards

    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.7-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Sat Aug 31 08:24:16 2019
    On Sat, 31 Aug 2019 15:00:29 +1000, faeychild wrote:


    Of course I have none, and Bits has supported the cause for some time.

    So a bit of google turned a howto page. It seems quite simple.

    The page suggests

    e2label /dev/sda1 Boot
    OR
    # tune2fs -L Boot /dev/sda1

    The page does not say that it can't be done on a running system.

    Is it safe to do so?

    It does also say that

    mkfs.ext4 /dev/sda1 -L ROOT

    can also be done but not on existing partitions with a file system - obviously


    I have no idea what you are reading, but the facts are you can create
    a media label on a partitions with a file system.

    If using a gpt partition table drive you can also name/label a partition.
    $ lsblk -o NAME,SIZE,FSTYPE,LABEL,PARTLABEL
    sdb 931.5G
    ├─sdb1 8G swap swap swap
    ├─sdb2 20G ext4 bk_up bk_up
    ├─sdb3 40G ext4 hotbu hotbu
    ├─sdb4 40G ext4 cauldron_bkup cauldron_bkup
    ├─sdb5 400G ext4 myth myth
    ├─sdb6 40G ext4 net_ins net_ins
    └─sdb7 40G ext4 net_ins_bkup net_ins_bkup

    I happen to set the partition label same as the media label.

    I can recommend using gparted to do medial and/or partition label/naming.
    Much less typing and less prone to making a mistake.

    It may warn/prevent you from doing an activity on mounted partition,


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Sat Aug 31 09:14:55 2019
    On Sat, 31 Aug 2019 15:00:29 +1000, faeychild wrote:


    Of course I have none, and Bits has supported the cause for some time.

    I am not supporting the cause for labels.

    They are dangerous when there is more than one partition with the same label.

    I find them quite useful in writing scripts to sync/backup partitions, automagically create fstab on clean installs, ...

    Upon new releases of Mageia Linux. I do clean installs using the release
    as part of the label. Label come in handy to pick which install to boot
    when using grub if you have created a grub script to use labels.

    If using a backup/restore script, much easier to test/select which
    partition is source and destination for doing backups and save/restore.

    For example I have just one script, bkup_restore, for backup/restore.
    I use soft links to figure out which is source and what to do.

    Example stripped down snippet follows:
    $ ls * | grep bkup_restore
    12 Nov 29 2011 bkup_cauldron -> bkup_restore
    12 May 20 2013 bkup_mga4 -> bkup_restore
    12 Sep 9 2014 bkup_mga5 -> bkup_restore
    12 Oct 5 2015 bkup_mga6 -> bkup_restore
    12 Aug 3 2018 bkup_mga61 -> bkup_restore
    12 Jun 29 12:37 bkup_mga7 -> bkup_restore
    12 Aug 24 13:36 bkup_mga71 -> bkup_restore
    12 Feb 27 2018 bkup_net_ins -> bkup_restore
    -rwxr-xr-x 1 root root 7.2K May 8 18:04 bkup_restore
    12 Nov 29 2011 restore_cauldron -> bkup_restore
    12 May 20 2013 restore_mga3 -> bkup_restore
    12 May 20 2013 restore_mga4 -> bkup_restore
    12 Sep 9 2014 restore_mga5 -> bkup_restore
    12 Oct 5 2015 restore_mga6 -> bkup_restore
    12 Aug 3 2018 restore_mga61 -> bkup_restore
    12 Jun 29 12:37 restore_mga7 -> bkup_restore
    12 Aug 24 13:36 restore_mga71 -> bkup_restore
    12 Feb 27 2018 restore_net_ins -> bkup_restore

    I have a script to change clean install's /etc/fstab
    from UUID=xxx to LABEL=xxx

    Deletion/creation of partitions can cause /dev/WXYZ to change.
    Formatting of a partition can change UUID.

    If any partition is formatted, I do not have to maintain the changed
    UUID in fstab. Since I have a multi-boot install I do not have to modify
    any of the other install's /etc/fstab.

    First time you have to replace one of your drives all that can become
    a nightmare if you are not prepared for that event.

    It also becomes a hassle when moving partitions from one drive to
    another. Everything needs to be updated if using /dev/WZYZ or UUID.

    I've installed/run smartctl and if a drive starts showing errors, very
    little change is required after bringing up the new drive.


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Sat Aug 31 10:06:32 2019
    On Sat, 31 Aug 2019 15:00:29 +1000, faeychild wrote:

    The page does not say that it can't be done on a running system.

    Is it safe to do so?

    I have had the command rejected because partition was mounted, I just
    cannot remember exactly why.

    If the partition is already labeled by some other operating system, I
    would be very reluctant about changing it.

    I tend to do all my disk/partition work with gparted usually from
    a system rescue cd iso from http://www.system-rescue-cd.org/Download/

    Beside having it on usb and cd, I created a grub script to be able
    to boot the iso from the grub menu.

    Script assumes iso is in a partition labeled spare. You will need to
    change the script to point to your iso storage location.
    - ---8<---8<---8<---8< cut below this line 8<---8<---8<---8<---8<---8< #!/bin/sh
    exec tail -n +3 $0 #**********************************************************************
    #* 20b_rescue_cd_xx__grub - boots system rescue cd iso
    #* Iso can be found on http://www.sysresccd.org/Main_Page
    #*
    #* Assumptions
    #* downloaded systemrescuecd iso is in the "/spare" partition
    #* and the partition is labeled spare.
    #* If not, change the _part_loc variable.
    #*
    #* Install procedure:
    #* save script in /etc/grub.d/
    #* chmod +x /etc/grub.d/20b_rescue_cd_xx__grub
    #* and rebuild /boot/grub*/grub.cfg with
    #* update-grub
    #* or update-grub2 depending on your install
    #*
    #* Note: name of script dictates location in menu. Run
    #* ls -1 /etc/grub.d/*_* to see menu selection order.
    #*
    #* This is free software released to public domain. Do with it whatever you want.
    #*
    #**********************************************************************

    menuentry 'System Rescue ISO (64-bit) ' {
    insmod regexp
    insmod part_gpt
    insmod ext2
    set _part_loc=spare
    search --no-floppy --label --set=root $_part_loc
    for _fn in systemrescuecd* ; do
    _iso_fn=$_fn
    done

    loopback loop (${root})/$_iso_fn

    linux (loop)/isolinux/rescue64 setkmap=us isoloop=$_iso_fn
    initrd (loop)/isolinux/initram.igz
    }

    #************************ end /etc/grub.d/20b_rescue_cd_xx__grub ***************

    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Sat Aug 31 11:17:39 2019
    On 31/8/19 6:14 pm, Bit Twister wrote:
    On Sat, 31 Aug 2019 15:00:29 +1000, faeychild wrote:


    Of course I have none, and Bits has supported the cause for some time.

    I am not supporting the cause for labels.


    An error in logic.
    Bits talks about labels often == Bits supports labels
    Not necessarily true.

    I must carefully read all your posts, but not mow.
    It's late and not a good time to do anything

    regards



    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.7-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From William Unruh@2:250/1 to All on Sat Aug 31 16:56:05 2019
    On 2019-08-31, faeychild <faeychild@afraid.org> wrote:


    Of course I have none, and Bits has supported the cause for some time.

    You do know that giving some context for what you are trying to say will
    help others to know what in the world you are talking about.
    You have no what? Labels? Labels for what?


    So a bit of google turned a howto page. It seems quite simple.

    The page suggests

    e2label /dev/sda1 Boot
    OR
    # tune2fs -L Boot /dev/sda1

    The page does not say that it can't be done on a running system.

    Is it safe to do so?

    It does also say that

    mkfs.ext4 /dev/sda1 -L ROOT

    can also be done but not on existing partitions with a file system - obviously

    regards


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Mon Sep 2 03:33:46 2019
    On 31/8/19 6:14 pm, Bit Twister wrote:



    I have a script to change clean install's /etc/fstab
    from UUID=xxx to LABEL=xxx

    ! would be interested in seeing that one




    I appreciate your need for the automation of your many incarnations of
    Mageia . It's a bit over the top for me because I only need to set up a
    spare partition to clone the OS onto and then it would sit..


    I haven't paid any attention to Grub and my last dual boot arrangement
    was with Windows and Lilo last century.
    But I like the idea of a rescue application available at boot


    I am still reading and googling the 20b_rescue_cd_xx__grub script


    Regards
    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.7-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Mon Sep 2 12:10:21 2019
    On Mon, 2 Sep 2019 12:33:46 +1000, faeychild wrote:
    On 31/8/19 6:14 pm, Bit Twister wrote:



    I have a script to change clean install's /etc/fstab
    from UUID=xxx to LABEL=xxx

    ! would be interested in seeing that one

    It runs to over 300 lines and includes another 100+ lines of include functions.
    Post your /etc/fstab here and I'll give you a much smaller script.

    I haven't paid any attention to Grub and my last dual boot arrangement
    was with Windows and Lilo last century.
    But I like the idea of a rescue application available at boot


    I am still reading and googling the 20b_rescue_cd_xx__grub script

    20b_rescue_cd_xx__grub is my custom script. I created it by copying one
    of the scripts in /etc/grub.d and used
    https://www.gnu.org/software/grub/manual/grub.html
    as reference.

    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From David W. Hodgins@2:250/1 to All on Mon Sep 2 14:34:35 2019
    On Mon, 02 Sep 2019 07:10:21 -0400, Bit Twister <BitTwister@mouse-potato.com> wrote:

    On Mon, 2 Sep 2019 12:33:46 +1000, faeychild wrote:
    On 31/8/19 6:14 pm, Bit Twister wrote:



    I have a script to change clean install's /etc/fstab
    from UUID=xxx to LABEL=xxx

    ! would be interested in seeing that one

    It runs to over 300 lines and includes another 100+ lines of include
    functions.
    Post your /etc/fstab here and I'll give you a much smaller script.

    Here's an old one that works. IIRC it's one that you posted sometime ago.

    $ cat bin/uuidlabel.sh
    #!/bin/bash
    [[ $(whoami) != root ]] && echo "Must be root" && exit
    [[ ! -r $1 ]] && echo "Can't read $1" && exit
    cp /dev/null $1.new
    while read line; do
    if [[ "$line" == *UUID=* ]]; then
    uuid1=${line#*UUID=}
    uuid=${uuid1%%[[:blank:]]*}
    dev=$(findfs UUID="$uuid")
    labelarray=($(/sbin/blkid -o udev -s LABEL "$dev"))
    echo labelarray[0]="${labelarray[0]}"
    label="${labelarray[0]#*=}"
    [[ -n "$label" ]] && line=${line//UUID=$uuid/LABEL=$label}
    fi
    echo $line >>$1.new
    done < $1

    Regards, Dave Hodgins

    --
    Change dwhodgins@nomail.afraid.org to davidwhodgins@teksavvy.com for
    email replies.

    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Mon Sep 2 16:39:23 2019
    On Mon, 02 Sep 2019 09:34:35 -0400, David W. Hodgins wrote:
    On Mon, 02 Sep 2019 07:10:21 -0400, Bit Twister
    <BitTwister@mouse-potato.com> wrote:

    On Mon, 2 Sep 2019 12:33:46 +1000, faeychild wrote:
    On 31/8/19 6:14 pm, Bit Twister wrote:



    I have a script to change clean install's /etc/fstab
    from UUID=xxx to LABEL=xxx

    ! would be interested in seeing that one

    It runs to over 300 lines and includes another 100+ lines of include functions.
    Post your /etc/fstab here and I'll give you a much smaller script.

    Here's an old one that works. IIRC it's one that you posted sometime ago.

    $ cat bin/uuidlabel.sh
    #!/bin/bash
    [[ $(whoami) != root ]] && echo "Must be root" && exit
    [[ ! -r $1 ]] && echo "Can't read $1" && exit
    cp /dev/null $1.new
    while read line; do
    if [[ "$line" == *UUID=* ]]; then
    uuid1=${line#*UUID=}
    uuid=${uuid1%%[[:blank:]]*}
    dev=$(findfs UUID="$uuid")
    labelarray=($(/sbin/blkid -o udev -s LABEL "$dev"))
    echo labelarray[0]="${labelarray[0]}"
    label="${labelarray[0]#*=}"
    [[ -n "$label" ]] && line=${line//UUID=$uuid/LABEL=$label}
    fi
    echo $line >>$1.new
    done < $1


    Yeah, but a new an improved script should make a fstab backup if
    does not exist, tell you about any UUID that can not be found,
    change swap's UUID to PARTLABEL if set, run as user to verify
    results, easier to understand at a glance, some comments,
    a little error checking, ...

    Just now finished the new and improved copy and waiting on the OP's
    fstab to run final tests.



    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Tue Sep 3 00:08:04 2019
    On 2/9/19 9:10 pm, Bit Twister wrote:
    On Mon, 2 Sep 2019 12:33:46 +1000, faeychild wrote:
    On 31/8/19 6:14 pm, Bit Twister wrote:



    I have a script to change clean install's /etc/fstab
    from UUID=xxx to LABEL=xxx

    ! would be interested in seeing that one

    It runs to over 300 lines and includes another 100+ lines of include
    functions.
    Post your /etc/fstab here and I'll give you a much smaller script.

    Right!! Don't go there.

    *******************
    cat /etc/fstab
    /dev/nvme0n1p2 / ext4 noatime,acl 1 1
    /dev/nvme0n1p1 /boot/EFI vfat umask=000,iocharset=utf8 0 0
    none /proc proc defaults 0 0
    /dev/nvme0n1p4 /tmp ext4 noatime,acl 1 2
    # Entry for /dev/sda1 :
    UUID=ddce96e5-77d9-45dd-b1c7-4bf10d42fff7 /video ext4 noatime,acl 1 2 /dev/nvme0n1p3 swap swap defaults 0 0
    *********************

    It's really small enough to be done manually and it will only be done once.


    I am still reading and googling the 20b_rescue_cd_xx__grub script

    20b_rescue_cd_xx__grub is my custom script. I created it by copying one
    of the scripts in /etc/grub.d and used
    https://www.gnu.org/software/grub/manual/grub.html
    as reference.

    I have scanned through /etc/grub.d. It's way over my head but I get
    the general idea..

    Regards

    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.7-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Tue Sep 3 00:13:57 2019
    On 2/9/19 11:34 pm, David W. Hodgins wrote:

    Here's an old one that works. IIRC it's one that you posted sometime ago.

    $ cat bin/uuidlabel.sh
    #!/bin/bash
    [[ $(whoami) != root ]] && echo "Must be root" && exit
    [[ ! -r $1 ]] && echo "Can't read $1" && exit
    cp /dev/null $1.new
    while read line; do
      if [[ "$line" == *UUID=* ]]; then
        uuid1=${line#*UUID=}
        uuid=${uuid1%%[[:blank:]]*}
        dev=$(findfs UUID="$uuid")
        labelarray=($(/sbin/blkid -o udev -s LABEL "$dev"))
        echo labelarray[0]="${labelarray[0]}"
        label="${labelarray[0]#*=}"
        [[ -n "$label" ]] && line=${line//UUID=$uuid/LABEL=$label}
      fi
      echo $line >>$1.new
    done < $1

    I suspect that Bit's script is replete with error traps and gotcha's
    and backup ass covering failsafes.
    The right way to do stuff.

    regards


    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.7-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Tue Sep 3 02:27:39 2019
    On Tue, 3 Sep 2019 09:08:04 +1000, faeychild wrote:

    Right!! Don't go there.

    *******************
    cat /etc/fstab
    /dev/nvme0n1p2 / ext4 noatime,acl 1 1
    /dev/nvme0n1p1 /boot/EFI vfat umask=000,iocharset=utf8 0 0
    none /proc proc defaults 0 0
    /dev/nvme0n1p4 /tmp ext4 noatime,acl 1 2
    # Entry for /dev/sda1 :
    UUID=ddce96e5-77d9-45dd-b1c7-4bf10d42fff7 /video ext4 noatime,acl 1 2 /dev/nvme0n1p3 swap swap defaults 0 0
    *********************

    Looking like you have not created the clean. testing partitions
    and do not have a partition for hot backups.

    I use the same value for mount point, Partition_Name, and Volume/Media label. Setting Partition_Name makes using gfdisk a little more informative.

    Example snippet

    # gdisk -l /dev/sda
    Number Start (sector) End (sector) Size Code Name
    1 2048 83888127 40.0 GiB 8300 mga6
    2 83888128 171864063 42.0 GiB 8300 mga5
    3 171864064 257384447 40.8 GiB 8300 mga7
    4 257384448 342192127 40.4 GiB 8300 cauldron
    5 342192128 387309567 21.5 GiB 8300 local
    6 387309568 434296831 22.4 GiB 8300 accounts
    7 434296832 558874623 59.4 GiB 8300 misc
    8 558874624 712286207 73.2 GiB 8300 spare
    9 712286208 1471924223 362.2 GiB 8300 vmguest
    10 1471924224 1471926271 1024.0 KiB EF02 bios_grub
    11 1471926272 1562466303 43.2 GiB 8300 mga61


    Ok, here is the script. save it, chmod +x it, and run it as user.

    That will just dump the new fsab to screen. If output looks good,
    run it again as root. I would like to see the results.

    I will assume you have booted a rescue cd,
    used gparted to Name Partitions and add a label if partitions
    do not have a label or partition Name.

    - ---8<---8<---8<---8<-cut below this line--8<---8<---8<---8<
    #!/bin/bash
    #**************************************************************
    #*
    #* fstab_changes - change fstab's UUID to LABEL
    #*
    #* creates a /etc/fstab_bkup if does not exists.
    #* converts all UUID=xxx into LABEL=lll if UUID partition
    #* has a volume/media label.
    #*
    #* If swap has a Partition name, the UUID= is changed to PARTLABEL=
    #* and removes any line starting with a # character
    #*
    #* Assumptions:
    #* All volume/media labels, partition names, UUIDs are unique.
    #*
    #**************************************************************

    PATH=/usr/local/sbin:/sbin:/usr/sbin:/usr/bin:/bin

    _cmd_line_args="$*"
    _exe=$0
    _app=${0##*/}
    _user=$(id --user --name )
    TMP=$(getent passwd $_user | awk -F: '{print $(NF - 1)}')/tmp

    set -u # Show usage of unset variables as an error to help catch typos.

    _char1=""
    _created_by="Created by $_exe $(date '+%a %d %b %H:%M %Y')"
    _dev=""
    _fn_in=/etc/fstab
    _fn_bkup=${_fn_in}_bkup
    _fn_fault=$TMP/$_app.fault
    _fn_out=$TMP/fstab
    _fn_tmp=$TMP/$_app.tmp
    _label=""
    _line_in=""
    _line_out=""
    _mount_pt=""
    _rest_line=""
    _wd1=""

    function parse_command_line ()
    {
    set -- $_cmd_line_args
    if [ $# -ne 0 ] ; then
    head -14 fstab_chg
    exit 0
    fi
    } # end function parse_command_line

    function get_vol_name ()
    {
    if [ "$_char1" = "U" ] ; then # get /dev/xxx
    _label_line=$_line_in # just in case not labeled
    set -- ${_line_in#*UUID=}
    _dev=$(findfs UUID="$1" 2> $_fn_tmp)
    if [ $? -ne 0 ] ; then
    echo "findfs UUID=\"$1\" FAILURE">> $_fn_fault
    cat $_fn_tmp >> $_fn_fault
    rm --force $_fn_tmp
    fi
    else
    _dev=$_wd1
    fi

    _label=$(blkid -o value -s LABEL $_dev)
    if [ -n "$_label" ] ; then
    _line_out="LABEL=$_label $_rest_line"
    fi

    if [ $_mount_pt = "swap" ] ; then
    _label=$(blkid -o value -s PARTLABEL $_dev)
    if [ -n "$_label" ] ; then
    _line_out="$PARTLABEL=$_label $_rest_line"
    fi
    fi

    } # end function get_vol_name

    function parse_line_in ()
    {
    _char1=""
    set -- $_line_in # parse line into $n arguments
    if [ $# -eq 0 ] ; then # empty line nothing to parse
    return
    fi

    _char1=${_line_in:0:1} # save first char of first word
    if [ $_char1 = '#' ] ; then # it is a comment pass it through
    return
    fi

    _wd1=$1 # save word 1 of line (IE. UUID=xxx)
    _mount_pt=$2 # save word 2 of line (mount point)

    shift # remove first word on line (xxxx=yyy)
    _rest_line="$*"
    get_vol_name

    } # end function parse_line_in

    #************************************
    #* main code start here
    #************************************

    parse_command_line
    mkdir --parents $TMP
    rm --force $_fn_fault

    echo "#********************************************************************" > $_fn_out
    echo "#* $_fn_in" >> $_fn_out
    echo "#* $_created_by" >> $_fn_out
    echo "#* " >> $_fn_out
    echo "#********************************************************************" >> $_fn_out

    while read _line_in ; do
    _line_out=$_line_in
    parse_line_in # parse line into _wd1 and _mount_pt
    if [ $_char1 != "#" ] ; then
    echo $_line_out >> $_fn_out
    fi
    done < $_fn_in

    echo "#****************** end $_fn_in ******************" >> $_fn_out

    if [ -e $_fn_fault ] ; then
    echo -e "\n\t # $_fn_fault from $_exe" >> $_fn_fault
    cat $_fn_fault
    exit 1
    fi

    if [ $_user = "root" ] ; then
    if [ ! -e $_fn_bkup ] ; then # create a backup copy
    cp --verbose $_fn_in $_fn_bkup
    fi
    cp --force --verbose $_fn_out $_fn_in
    else
    cat $_fn_out
    echo "
    You need to be root to actually overwrite $_fn_in
    "
    fi

    rm --force --verbose $TMP/${_app}* $_fn_out

    exit 0
    #*************** end fstab_changes ******************************

    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Wed Sep 4 08:22:37 2019
    On 3/9/19 11:27 am, Bit Twister wrote:

    Looking like you have not created the clean. testing partitions
    and do not have a partition for hot backups.

    Correct! not yet

    I use the same value for mount point, Partition_Name, and Volume/Media
    label.
    Setting Partition_Name makes using gfdisk a little more informative.

    All good arguments

    # gdisk -l /dev/sda
    Number Start (sector) End (sector) Size Code Name
    1 2048 83888127 40.0 GiB 8300 mga6
    2 83888128 171864063 42.0 GiB 8300 mga5
    3 171864064 257384447 40.8 GiB 8300 mga7
    4 257384448 342192127 40.4 GiB 8300 cauldron
    5 342192128 387309567 21.5 GiB 8300 local
    6 387309568 434296831 22.4 GiB 8300 accounts
    7 434296832 558874623 59.4 GiB 8300 misc
    8 558874624 712286207 73.2 GiB 8300 spare
    9 712286208 1471924223 362.2 GiB 8300 vmguest
    10 1471924224 1471926271 1024.0 KiB EF02 bios_grub
    11 1471926272 1562466303 43.2 GiB 8300 mga61


    If bios_grub is your EFI partition then I could look towards reducing
    the size of mine a little



    Ok, here is the script. save it, chmod +x it, and run it as user.



    I will assume you have booted a rescue cd,
    used gparted to Name Partitions and add a label if partitions
    do not have a label or partition Name.

    No! Not yet.

    ********************

    stream]$ ./fstab-label.sh* #********************************************************************
    #* /etc/fstab
    #* Created by ./fstab-label.sh Wed 04 Sep 17:03 2019
    #*
    #******************************************************************** /dev/nvme0n1p2 / ext4 noatime,acl 1 1
    /dev/nvme0n1p1 /boot/EFI vfat umask=000,iocharset=utf8 0 0
    none /proc proc defaults 0 0
    /dev/nvme0n1p4 /tmp ext4 noatime,acl 1 2 UUID=ddce96e5-77d9-45dd-b1c7-4bf10d42fff7 /video ext4 noatime,acl 1 2 /dev/nvme0n1p3 swap swap defaults 0 0
    #****************** end /etc/fstab ******************

    You need to be root to actually overwrite /etc/fstab

    removed '/home/faeychild/tmp/fstab-label.sh.tmp'
    removed '/home/faeychild/tmp/fstab'
    [faeychild@unimatrix stream]$

    *************************


    Stupid question. If I change the partition names with gparted what re-writes the fstab file to reflect the changes?


    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Wed Sep 4 09:02:28 2019
    On Wed, 4 Sep 2019 17:22:37 +1000, faeychild wrote:
    On 3/9/19 11:27 am, Bit Twister wrote:

    Looking like you have not created the clean. testing partitions
    and do not have a partition for hot backups.

    Correct! not yet

    I use the same value for mount point, Partition_Name, and Volume/Media label.
    Setting Partition_Name makes using gfdisk a little more informative.

    All good arguments

    # gdisk -l /dev/sda
    Number Start (sector) End (sector) Size Code Name

    9 712286208 1471924223 362.2 GiB 8300 vmguest
    10 1471924224 1471926271 1024.0 KiB EF02 bios_grub
    11 1471926272 1562466303 43.2 GiB 8300 mga61


    If bios_grub is your EFI partition then I could look towards reducing
    the size of mine a little

    EFI and bios grub are two different items. /boot/EFI vfat used by bios
    not set for Legacy OS booting.
    bios grub partition is required by grub2 for Legacy OS only booting



    Ok, here is the script. save it, chmod +x it, and run it as user.



    I will assume you have booted a rescue cd,
    used gparted to Name Partitions and add a label if partitions
    do not have a label or partition Name.

    No! Not yet.

    I would like you to post results from
    sblk -i -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT,PARTLABEL | sort -V
    please


    ********************

    stream]$ ./fstab-label.sh* #********************************************************************
    #* /etc/fstab
    #* Created by ./fstab-label.sh Wed 04 Sep 17:03 2019
    #*
    #******************************************************************** /dev/nvme0n1p2 / ext4 noatime,acl 1 1
    /dev/nvme0n1p1 /boot/EFI vfat umask=000,iocharset=utf8 0 0
    none /proc proc defaults 0 0
    /dev/nvme0n1p4 /tmp ext4 noatime,acl 1 2 UUID=ddce96e5-77d9-45dd-b1c7-4bf10d42fff7 /video ext4 noatime,acl 1 2 /dev/nvme0n1p3 swap swap defaults 0 0
    #****************** end /etc/fstab ******************

    You need to be root to actually overwrite /etc/fstab

    removed '/home/faeychild/tmp/fstab-label.sh.tmp'
    removed '/home/faeychild/tmp/fstab'
    [faeychild@unimatrix stream]$

    *************************


    Stupid question.

    The only stupid question is the one not asked.
    All the others are ignorant or clarification types.

    If I change the partition names with gparted what
    re-writes the fstab file to reflect the changes?

    The biological software between keyboard and chair,
    OS Software installer, or sys admin running a custom script. :)




    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Doug Laidlaw@2:250/1 to All on Wed Sep 4 09:22:44 2019
    On 31/8/19 6:14 pm, Bit Twister wrote:
    If any partition is formatted, I do not have to maintain the changed
    UUID in fstab. Since I have a multi-boot install I do not have to modify
    any of the other install's /etc/fstab.

    I read something about this a few months back. I may have remembered it wrong.

    Firstly, swap is not a e2fs file system. Any commands you mention won't
    work on swap.

    Secondly, Bits mentions that changing a label will nuke the drive's file system. That was what I was taught, but gparted will change the label
    and leave your data intact. So long as you can unmount the drive, you
    should be able to use gparted. I have never tried to change a disk that
    is in use, or "busy."

    If the drive already has a label, and you want to edit fstab to use that
    label instead of a UUID, go right ahead. fstab is read once on bootup,
    and again if you use a command like "mount". During a session that
    doesn't affect your disks, nothing will happen until the next reboot.

    --
    Life is too short to be little. -- Benjamin Disraeli, a _real_ English
    P.M. Quote approved by Andre Maurois.

    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: Aioe.org NNTP Server (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Wed Sep 4 09:47:04 2019
    On Wed, 4 Sep 2019 18:22:44 +1000, Doug Laidlaw wrote:
    On 31/8/19 6:14 pm, Bit Twister wrote:
    If any partition is formatted, I do not have to maintain the changed
    UUID in fstab. Since I have a multi-boot install I do not have to modify
    any of the other install's /etc/fstab.

    I read something about this a few months back. I may have remembered it wrong.

    Firstly, swap is not a e2fs file system. Any commands you mention won't
    work on swap.

    Secondly, Bits mentions that changing a label will nuke the drive's file system.

    No I did not say that. I said formatting changes the UUID. Formatting
    also erases the media/volume label. It does not change the Partition Name.

    Dinking around with the usual partitioning tools should not
    "nuke the drive's file system"


    Dinking around with disk partitioning tools (f,cf,g,sf,sg)disk
    can nuke the drive's file system


    That was what I was taught, but gparted will change the label
    and leave your data intact. So long as you can unmount the drive, you
    should be able to use gparted. I have never tried to change a disk that
    is in use, or "busy."

    If the drive already has a label, and you want to edit fstab to use that label instead of a UUID, go right ahead. fstab is read once on bootup,
    and again if you use a command like "mount".

    And when you use a gui filem anager utility and when a drive is
    powered up, for example inserting a usb drive.


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Wed Sep 4 22:18:19 2019
    On 4/9/19 6:02 pm, Bit Twister wrote:

    I would like you to post results from
    sblk -i -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT,PARTLABEL | sort -V
    please



    ~]$ lsblk -i -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT,PARTLABEL | sort -V
    NAME SIZE FSTYPE LABEL MOUNTPOINT PARTLABEL
    nvme0n1 119.2G
    sda 5.5T
    sdb 29.7G
    sr0 1024M
    `-nvme0n1p4 12.2G ext4 /tmp /tmp
    `-sda1 5.5T ext4 /video
    `-sdb1 29.7G vfat
    |-nvme0n1p1 299M vfat /boot/EFI
    |-nvme0n1p2 44G ext4 /
    |-nvme0n1p3 10.6G swap [SWAP] /swap




    If I change the partition names with gparted what
    re-writes the fstab file to reflect the changes?

    The biological software between keyboard and chair,
    OS Software installer, or sys admin running a custom script. :)


    Oh God!! I thought it may have to he him :-)


    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Wed Sep 4 22:27:04 2019
    On 4/9/19 6:22 pm, Doug Laidlaw wrote:

    Secondly, Bits mentions that changing a label will nuke the drive's file system.  That was what I was taught, but gparted will change the label

    I think that was me,Doug

    My google searches for "partition label" commands, among others, turned
    up "mkfs.ext4" which can LABEL but will trash the resident file system. gparted is much better





    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Wed Sep 4 23:55:53 2019
    On Thu, 5 Sep 2019 07:18:19 +1000, faeychild wrote:
    On 4/9/19 6:02 pm, Bit Twister wrote:



    ~]$ lsblk -i -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT,PARTLABEL | sort -V
    NAME SIZE FSTYPE LABEL MOUNTPOINT PARTLABEL
    nvme0n1 119.2G
    sda 5.5T
    sdb 29.7G
    sr0 1024M
    `-sda1 5.5T ext4 /video

    I would bet you have 5% of 5.5T as reserved blocks.

    If it were I, I would boot the systemrescecd, click the third icon
    bottom left. (gparted)
    Right click /sda1, select Name Partition and set it video. click Apply,
    Right click /sda1, select Label file system and set it video. click Apply

    `-nvme0n1p4 12.2G ext4 /tmp /tmp
    Right click select Name Partition and set it tmp. click Apply,
    Right click select Label file system and set it tmp. click Apply

    `-sdb1 29.7G vfat

    Here it would be D_vfat or C_vfat if using microsoft or whatever you
    are storing there.

    |-nvme0n1p1 299M vfat /boot/EFI

    Here I would use boot_efi for Partition Name and maybe not Label file system. Just not sure of the ramifications of mounting it in a EFI setup.
    New kernel will update on the mount point. So we should not make
    the mount point as boot_efi.

    |-nvme0n1p2 44G ext4 /

    Right click, select Name Partition and set it mga7. click Apply
    Right click, select Label file system and set it mga7. click Apply

    |-nvme0n1p3 10.6G swap [SWAP] /swap

    Right click, select Name Partition and set it swap. click Apply

    reboot and
    lsblk -i -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT,PARTLABEL | sort -V

    If looks good, run the fstab_changes script as user to see what would
    happen.





    If I change the partition names with gparted what
    re-writes the fstab file to reflect the changes?

    The biological software between keyboard and chair,
    OS Software installer, or sys admin running a custom script. :)


    Oh God!! I thought it may have to he him :-)




    --
    The warranty and liability expired as you read this message.
    If the above breaks your system, it's yours and you keep both pieces.
    Practice safe computing. Backup the file before you change it.
    Do a, man command_here or cat command_here, before using it.

    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Thu Sep 5 01:47:26 2019
    On 5/9/19 8:55 am, Bit Twister wrote:
    On Thu, 5 Sep 2019 07:18:19 +1000, faeychild wrote:
    On 4/9/19 6:02 pm, Bit Twister wrote:



    ~]$ lsblk -i -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT,PARTLABEL | sort -V
    NAME SIZE FSTYPE LABEL MOUNTPOINT PARTLABEL
    nvme0n1 119.2G
    sda 5.5T
    sdb 29.7G
    sr0 1024M
    `-sda1 5.5T ext4 /video

    I would bet you have 5% of 5.5T as reserved blocks.

    that is quite a lot of reserved space, Bits. Are you suggesting that it
    could be a lot smaller. The 5.5 & disk is not going to fill up soon,
    it's only junk and transient video flies being processed

    If it were I, I would boot the systemrescecd, click the third icon
    bottom left. (gparted)
    Right click /sda1, select Name Partition and set it video. click Apply,
    Right click /sda1, select Label file system and set it video. click Apply

    `-nvme0n1p4 12.2G ext4 /tmp /tmp
    Right click select Name Partition and set it tmp. click Apply,
    Right click select Label file system and set it tmp. click Apply

    `-sdb1 29.7G vfat


    I should have ditched this - it a USB stick



    Here it would be D_vfat or C_vfat if using microsoft or whatever you
    are storing there.

    |-nvme0n1p1 299M vfat /boot/EFI

    Here I would use boot_efi for Partition Name and maybe not Label file
    system.
    Just not sure of the ramifications of mounting it in a EFI setup.
    New kernel will update on the mount point. So we should not make
    the mount point as boot_efi.

    |-nvme0n1p2 44G ext4 /

    Right click, select Name Partition and set it mga7. click Apply
    Right click, select Label file system and set it mga7. click Apply

    |-nvme0n1p3 10.6G swap [SWAP] /swap

    Right click, select Name Partition and set it swap. click Apply

    reboot and

    So will the system boot with the old fstab and not be affected by the
    new label changes.


    lsblk -i -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT,PARTLABEL | sort -V

    If looks good, run the fstab_changes script as user to see what would
    happen.


    I will probably find time this afternoon to trash everything.

    regards


    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Thu Sep 5 01:53:44 2019
    On 5/9/19 10:47 am, faeychild wrote:

    lsblk -i -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT,PARTLABEL | sort -V

    If looks good, run the fstab_changes script as user to see what would
    happen.


    I will probably find time this afternoon to trash everything.

    regards


    Also very importantly, Bits. How do you check the viability of the
    backup? How do you know it will work when restored?

    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Thu Sep 5 07:52:13 2019
    On 5/9/19 8:55 am, Bit Twister wrote:


    If it were I, I would boot the systemrescecd, click the third icon
    bottom left. (gparted)
    Right click /sda1, select Name Partition and set it video. click Apply,
    Right click /sda1, select Label file system and set it video. click Apply




    I booted system rescue and split the spare partition into approx 20+ gig sections named back_up-1 and back_up-2.


    lsblk -i -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT,PARTLABEL | sort -V
    NAME SIZE FSTYPE LABEL MOUNTPOINT PARTLABEL
    nvme0n1 119.2G
    sda 5.5T
    sdb 29.7G
    sr0 1024M
    `-nvme0n1p6 28.6G ext2 back_up-2
    `-sda1 5.5T ext4 /video
    `-sdb1 29.7G vfat
    |-nvme0n1p1 299M vfat /boot/EFI
    |-nvme0n1p2 44G ext4 /
    |-nvme0n1p3 10.6G swap [SWAP] /swap
    |-nvme0n1p4 12.2G ext4 /tmp /tmp
    |-nvme0n1p5 23.6G ext2 back_up-1




    You may have noticed that I am wasting quite a lot of space on root.

    The partition is 44G only 9G is used.
    ..

    df -h
    Filesystem Size Used Avail Use% Mounted on
    devtmpfs 3.9G 0 3.9G 0% /dev
    tmpfs 3.9G 29M 3.9G 1% /dev/shm
    tmpfs 3.9G 1.2M 3.9G 1% /run
    /dev/nvme0n1p2 44G 9.0G 32G 22% /
    tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
    /dev/nvme0n1p4 12G 12G 227M 99% /tmp
    /dev/nvme0n1p1 299M 136K 299M 1% /boot/EFI
    /dev/sda1 5.5T 2.5T 2.7T 49% /video
    tmpfs 794M 20K 794M 1% /run/user/1000



    ~]$ lsblk -i -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT,PARTLABEL | sort -V
    NAME SIZE FSTYPE LABEL MOUNTPOINT PARTLABEL
    nvme0n1 119.2G
    sda 5.5T
    sdb 29.7G
    sr0 1024M
    `-nvme0n1p6 28.6G ext2 back_up-2
    `-sda1 5.5T ext4 /video
    `-sdb1 29.7G vfat
    |-nvme0n1p1 299M vfat /boot/EFI
    |-nvme0n1p2 44G ext4 /
    |-nvme0n1p3 10.6G swap [SWAP] /swap
    |-nvme0n1p4 12.2G ext4 /tmp /tmp
    |-nvme0n1p5 23.6G ext2 back_up-1


    So I could revamp the whole drive, shrink the original root partition
    and have several spare partitions.

    I was really lazy when I first installed and the drama with EFI back
    with M6 left me just glad to have anything running.

    maybe it's time to get serious

    regards

    sysrescue is now a USB stick. it's a tad faster

    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Thu Sep 5 09:12:10 2019
    On Thu, 5 Sep 2019 10:53:44 +1000, faeychild wrote:

    Also very importantly, Bits. How do you check the viability of the
    backup? How do you know it will work when restored?

    Depends on what tool/application used for backup.

    I use rsync. It verifies what was written as it goes. No need to run
    a second task to verify backup is valid.

    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Thu Sep 5 09:22:13 2019
    On Thu, 5 Sep 2019 10:47:26 +1000, faeychild wrote:
    On 5/9/19 8:55 am, Bit Twister wrote:
    On Thu, 5 Sep 2019 07:18:19 +1000, faeychild wrote:
    On 4/9/19 6:02 pm, Bit Twister wrote:



    ~]$ lsblk -i -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT,PARTLABEL | sort -V
    NAME SIZE FSTYPE LABEL MOUNTPOINT PARTLABEL
    nvme0n1 119.2G
    sda 5.5T
    sdb 29.7G
    sr0 1024M
    `-sda1 5.5T ext4 /video

    I would bet you have 5% of 5.5T as reserved blocks.

    that is quite a lot of reserved space, Bits. Are you suggesting that it could be a lot smaller.

    Yep. Typically when you format a partition, usually with a gui tool of
    your choice, 5% of the partition is reserved.

    The 5.5 & disk is not going to fill up soon,
    it's only junk and transient video flies being processed

    Hmmmm, I thought transient video flies being processed were done in /tmp
    since you had created a 12.2G ext4 /tmp partition.
    I do not have a /tmp partition. My /tmp is just a sub directory under /


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Thu Sep 5 10:29:41 2019
    On Thu, 5 Sep 2019 16:52:13 +1000, faeychild wrote:
    On 5/9/19 8:55 am, Bit Twister wrote:


    If it were I, I would boot the systemrescecd, click the third icon
    bottom left. (gparted)
    Right click /sda1, select Name Partition and set it video. click Apply,
    Right click /sda1, select Label file system and set it video. click Apply




    I booted system rescue and split the spare partition into approx 20+ gig sections named back_up-1 and back_up-2.

    Yuck. Not an ideal set of names. I prefer a somewhat meaningful name.
    Examples: hotbu, prod_bkup, cauldron_bkup, netinstall_bkup,

    hotbu is my current Production install. After a kernel update or I
    get a whole lot of updates, I boot previous install and run my backup
    script to rsync /mga7 to /hotbu. That way if reboot after package install
    or me removing orphans that hurt my system, I can rsync /hotbu to /mga7


    lsblk -i -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT,PARTLABEL | sort -V
    NAME SIZE FSTYPE LABEL MOUNTPOINT PARTLABEL
    nvme0n1 119.2G
    sda 5.5T
    sdb 29.7G
    sr0 1024M
    `-nvme0n1p6 28.6G ext2 back_up-2

    You need to format new partitions as ext4. They have journaling which
    improves reliability in the event partition/system goes down.


    `-sda1 5.5T ext4 /video
    `-sdb1 29.7G vfat
    |-nvme0n1p1 299M vfat /boot/EFI
    |-nvme0n1p2 44G ext4 /
    |-nvme0n1p3 10.6G swap [SWAP] /swap
    |-nvme0n1p4 12.2G ext4 /tmp /tmp
    |-nvme0n1p5 23.6G ext2 back_up-1

    Hmm, I see you gave a Name to some partitions, but did not use
    Label file system to give the partition a volume/medial label. :(

    By the way, I suggested you using gparted from rescue cd because I
    wanted to make nvme0n1p2 available to Name and Label it.

    You can install gparted on your install which allows to to dink around partitions that can be dismounted . Go ahead and install the gparted package, run
    it to format you back_up* partitions to ext4, Name the partitions and
    Label the file system. The run lsblk.


    You may have noticed that I am wasting quite a lot of space on root.

    The partition is 44G only 9G is used.

    Yeah, my out of the box is close to that, after games and all the
    extra stuff mine is
    Filesystem Size Used Avail Use% Mounted on
    /dev/sda3 40G 16G 22G 42% /

    My rule of thumb is at least twice size of install usage.
    The journal storage usage is some percentage of / partition size.
    Back when I used to do upgrades, I wanted space to download all packages
    prior to doing the upgrade. On package installs you need extra room for
    new package contents before old package contents are removed.

    Since you do not have a separate partition for user files. you have
    to leave room on / for /home. Like you I have /home under /.
    But I also have a /accounts partition. That is where I soft link
    desired files/directories from /home/$USER to /accounts/$USER.
    Short chopped down example list from ls -al

    .bash_profile -> /accounts/bittwister/.bash_profile
    Desktop -> /accounts/bittwister/Desktop
    mail -> /accounts/bittwister/mail
    .thunderbird -> /accounts/bittwister/.thunderbird
    .VirtualBox -> /vmguest/vm


    .

    df -h
    Filesystem Size Used Avail Use% Mounted on
    devtmpfs 3.9G 0 3.9G 0% /dev
    tmpfs 3.9G 29M 3.9G 1% /dev/shm
    tmpfs 3.9G 1.2M 3.9G 1% /run
    /dev/nvme0n1p2 44G 9.0G 32G 22% /
    tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
    /dev/nvme0n1p4 12G 12G 227M 99% /tmp
    /dev/nvme0n1p1 299M 136K 299M 1% /boot/EFI
    /dev/sda1 5.5T 2.5T 2.7T 49% /video
    tmpfs 794M 20K 794M 1% /run/user/1000



    ~]$ lsblk -i -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT,PARTLABEL | sort -V
    NAME SIZE FSTYPE LABEL MOUNTPOINT PARTLABEL
    nvme0n1 119.2G
    sda 5.5T
    sdb 29.7G
    sr0 1024M
    `-nvme0n1p6 28.6G ext2 back_up-2
    `-sda1 5.5T ext4 /video
    `-sdb1 29.7G vfat
    |-nvme0n1p1 299M vfat /boot/EFI
    |-nvme0n1p2 44G ext4 /
    |-nvme0n1p3 10.6G swap [SWAP] /swap
    |-nvme0n1p4 12.2G ext4 /tmp /tmp
    |-nvme0n1p5 23.6G ext2 back_up-1


    So I could revamp the whole drive, shrink the original root partition
    and have several spare partitions.

    Looking at
    /dev/nvme0n1p2 44G 9.0G 32G 22% /

    I do not see where you will get several spare partitions.
    Assume a gig of space for journaling, space for packages during upgrade
    and /home, I can not see you getting "several" partitions.

    Since you do not want to go the clean install route on each new release,
    I suggest you need room for worst case package install. I download all
    update packages, that way a ISP network outage in the mist of updates
    will not cause me install problems. I also run a test install to get
    a warm feeling that no packages on the drive are corrupt and actual
    package install will work. Then I run the install and run a check
    to verify there are no packages left in the urpm download cache.


    I was really lazy when I first installed and the drama with EFI back
    with M6 left me just glad to have anything running.

    maybe it's time to get serious

    As root run
    gdisk -l /dev/nvme0n1

    and post just the
    Number Start (sector) End (sector) Size Code Name
    section.

    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Thu Sep 5 13:52:39 2019
    On 5/9/19 6:12 pm, Bit Twister wrote:


    I use rsync. It verifies what was written as it goes. No need to run
    a second task to verify backup is valid.


    Can you boot that backup to be sure?


    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Thu Sep 5 14:01:44 2019
    On 5/9/19 6:22 pm, Bit Twister wrote:


    The 5.5 & disk is not going to fill up soon,
    it's only junk and transient video flies being processed

    Hmmmm, I thought transient video flies being processed were done in /tmp since you had created a 12.2G ext4 /tmp partition.
    I do not have a /tmp partition. My /tmp is just a sub directory under /


    Very astute Bits, I discovered this the hard way when processing a video
    file
    Only to have it fall over due to lack of space. It did take me awhile to understand why.


    Long ago and far away. Don't remember the details. I could probably
    correct it now by redirecting /temp. The problem may no longer exist.

    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Thu Sep 5 14:09:39 2019
    On 5/9/19 7:29 pm, Bit Twister wrote:


    You need to format new partitions as ext4. They have journaling which improves reliability in the event partition/system goes down.




    As root run
    gdisk -l /dev/nvme0n1

    and post just the
    Number Start (sector) End (sector) Size Code Name
    section.


    it's 23:00 here Bits. A bad time to dink around with anything.

    I will get back :-)

    regards


    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Thu Sep 5 17:13:15 2019
    On Thu, 5 Sep 2019 22:52:39 +1000, faeychild wrote:
    On 5/9/19 6:12 pm, Bit Twister wrote:


    I use rsync. It verifies what was written as it goes. No need to run
    a second task to verify backup is valid.


    Can you boot that backup to be sure?

    Yeeesssss, BUT get this in your head, anytime grub-update runs, say,
    because of a kernel update, It will show up in the next grub menu.

    You select it, and grub boots the kernel in the partition, and the
    code reads /etc/fstab. Since it is a copy of the production partition
    /etc/stab points to Production and not Backup. :(

    Since you are not running a multi-boot setup, you would boot the rescue system do the rsync backup. This is why it is handy to have a rescuecd selection
    in the grub memu. :)

    If you want to test the backup, while in the rescuecd, you edit the backup /etc/fstab / to use the backup partition. umount partitions in use and
    boot the backup.

    When up, you would be running out of the backup partition, and using
    everything in backup, including $HOME.

    When through testing, you should reboot rescuecd, and run the backup
    again just to keep you out of trouble if you just run the restore backup.

    From what I see so far, come mga8 or mga9 release, you are going to gamble
    that you will have no problems when your run the upgrade, hours+ later and reboot. If you have major or minor problems, then it is a simple boot
    rescue and restore from backup, IE, back to mga7.

    No logs or anything to provide any requested data for problem resolution
    and/or bug reporting.




    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Fri Sep 6 06:34:29 2019
    On 5/9/19 11:09 pm, faeychild wrote:

    \I have been dinking around, Bits

    As root run
        gdisk -l /dev/nvme0n1


    Number Start (sector) End (sector) Size Code Name
    1 2048 614433 299.0 MiB EF00 EFI
    2 616448 47400959 22.3 GiB 8300 MG7
    3 227776512 250068991 10.6 GiB 8200 /swap
    4 202270720 227776511 12.2 GiB 8300 /tmp
    5 47400960 90144767 20.4 GiB 8300 MG7_bu
    6 198010880 202270719 2.0 GiB 8300 sysres



    lsblk -i -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT,PARTLABEL | sort -V
    NAME SIZE FSTYPE LABEL MOUNTPOINT PARTLABEL
    nvme0n1 119.2G
    sda 5.5T
    sr0 1024M
    `-nvme0n1p6 2G ext4 sysres sysres
    `-sda1 5.5T ext4 data /video data
    |-nvme0n1p1 299M vfat /boot/EFI EFI
    |-nvme0n1p2 22.3G ext4 MG7 / MG7
    |-nvme0n1p3 10.6G swap [SWAP] /swap
    |-nvme0n1p4 12.2G ext4 /tmp /tmp
    |-nvme0n1p5 20.4G ext4 MG7_bu MG7_bu




    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Fri Sep 6 08:18:07 2019
    On Fri, 6 Sep 2019 15:34:29 +1000, faeychild wrote:
    On 5/9/19 11:09 pm, faeychild wrote:

    \I have been dinking around, Bits


    lsblk -i -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT,PARTLABEL | sort -V
    NAME SIZE FSTYPE LABEL MOUNTPOINT PARTLABEL
    `-nvme0n1p6 2G ext4 sysres sysres
    `-sda1 5.5T ext4 data /video data
    |-nvme0n1p1 299M vfat /boot/EFI EFI
    |-nvme0n1p2 22.3G ext4 MG7 / MG7
    |-nvme0n1p3 10.6G swap [SWAP] /swap
    |-nvme0n1p4 12.2G ext4 /tmp /tmp

    You missed labeling tmp.

    |-nvme0n1p5 20.4G ext4 MG7_bu MG7_bu

    Looking a bit better. but, you need to go back and remove the slash
    from the names and labels.

    That way if you use a script to automagically add partitions to fstab
    the code does not have to remove the leading / every time it has to use
    the partition's name or label.

    Speaking of which, go ahead and run the fstab_changes script as user and
    see what fstab would look like at this moment.
    No need to post the results unless you think something is wrong.

    We also talked about making the name/label the same as the mount point.

    An example you might decide to have a partition where you keep downloaded
    isos. As far as I am concerned that is just data.

    Ah, it just dawned on me, what the sysres partition is.

    I have a /spare partition where I store my backup, Mageia, rescue isos,
    tar archives and other stuff.
    `-sda8 73.2G ext4 spare /spare spare

    I used to have a /video partition. changed it to /myth
    `-sda12 599.3G ext4 myth /myth myth
    which contains
    3rdParty cache Fanart Music Photographs Shows Trailers Banners channels LiveTV MusicArt recordings themes Videos
    bkup Coverart lost+found MythBrowser Screenshots

    Now any node on my Lan can use mythtv to watch Videos, recorded tv shows
    and whatnot.

    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Fri Sep 6 23:19:51 2019
    On 6/9/19 3:34 pm, faeychild wrote:
    On 5/9/19 11:09 pm, faeychild wrote:

    \I have been dinking around, Bits

    As root run
        gdisk -l /dev/nvme0n1


    Number Start (sector) End (sector) Size Code Name
    1 2048 614433 299.0 MiB EF00 EFI
    2 616448 47400959 22.3 GiB 8300 MG7
    3 227776512 250068991 10.6 GiB 8200 swap
    4 202270720 227776511 12.2 GiB 8300 tmp
    5 47400960 90144767 20.4 GiB 8300 MG7_bu
    6 198010880 202270719 2.0 GiB 8300 sysrescue



    lsblk -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT,PARTLABEL | sort -V
    NAME SIZE FSTYPE LABEL MOUNTPOINT PARTLABEL
    nvme0n1 119.2G
    sda 5.5T
    sr0 1024M
    └─nvme0n1p6 2G ext4 sysrescue sysrescue
    └─sda1 5.5T ext4 data /video data
    ├─nvme0n1p1 299M vfat /boot/EFI EFI
    ├─nvme0n1p2 22.3G ext4 MG7 / MG7
    ├─nvme0n1p3 10.6G swap swap [SWAP] swap
    ├─nvme0n1p4 12.2G ext4 tmp /tmp tmp
    ├─nvme0n1p5 20.4G ext4 MG7_bu MG7_bu




    your script run as user
    ]$ ./fstab-label.sh
    ../fstab-label.sh: line 75: PARTLABEL: unbound variable



    Attempting to label EFI results in an endless run with gparted.
    You did reference this in an earlier post.

    Currently sysrescue doesn't work. I'm not surprised !!

    I have copied the files from the sysrescue ISO into the partition and
    ran update-gru2.

    It was not picked up by grub.
    I tried setting boot flags on the partition also - no go.


    The sysrescue page is well documented. I shall read the instructions
    slowly with much coffee




    regards



    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Sat Sep 7 00:38:19 2019
    On Sat, 7 Sep 2019 08:19:51 +1000, faeychild wrote:
    On 6/9/19 3:34 pm, faeychild wrote:
    On 5/9/19 11:09 pm, faeychild wrote:

    \I have been dinking around, Bits

    As root run
        gdisk -l /dev/nvme0n1


    Number Start (sector) End (sector) Size Code Name
    1 2048 614433 299.0 MiB EF00 EFI
    2 616448 47400959 22.3 GiB 8300 MG7
    3 227776512 250068991 10.6 GiB 8200 swap
    4 202270720 227776511 12.2 GiB 8300 tmp
    5 47400960 90144767 20.4 GiB 8300 MG7_bu
    6 198010880 202270719 2.0 GiB 8300 sysrescue



    lsblk -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT,PARTLABEL | sort -V
    NAME SIZE FSTYPE LABEL MOUNTPOINT PARTLABEL
    nvme0n1 119.2G
    sda 5.5T
    sr0 1024M
    └─nvme0n1p6 2G ext4 sysrescue sysrescue
    └─sda1 5.5T ext4 data /video data
    ├─nvme0n1p1 299M vfat /boot/EFI EFI
    ├─nvme0n1p2 22.3G ext4 MG7 / MG7
    ├─nvme0n1p3 10.6G swap swap [SWAP] swap
    ├─nvme0n1p4 12.2G ext4 tmp /tmp tmp
    ├─nvme0n1p5 20.4G ext4 MG7_bu MG7_bu




    your script run as user
    ]$ ./fstab-label.sh
    ./fstab-label.sh: line 75: PARTLABEL: unbound variable

    Ok, in line 75 change
    from _line_out="$PARTLABEL=$_label $_rest_line"
    to _line_out="PARTLABEL=$_label $_rest_line"

    Attempting to label EFI results in an endless run with gparted.
    You did reference this in an earlier post.

    Hmm, I would have thought gparted would be smart enough to label a
    vfat partition. That is a bug, You might want to see about reporting at
    http://gparted.sourceforge.net

    Currently sysrescue doesn't work. I'm not surprised !!

    I assume you saved/modified /etc/grub.d/20b_rescue_cd_xx__grub to
    use sysrescue instead of my partition spare. If not change
    line 30
    from set _part_loc=spare
    to set _part_loc=sysrescue

    I also assumed you followed the install instructions to set the
    execute permission bit. See line 14


    and ran update-grub2.

    It was not picked up by grub.
    I tried setting boot flags on the partition also - no go.

    Instructions in file did not say to do so. Back out/undo that change.


    The sysrescue page is well documented. I shall read the instructions
    slowly with much coffee


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Sat Sep 7 00:43:42 2019
    On Sat, 7 Sep 2019 08:19:51 +1000, faeychild wrote:
    On 6/9/19 3:34 pm, faeychild wrote:

    I have copied the files from the sysrescue ISO

    That was a bit of wasted space. The /etc/grub.d/20b_rescue_cd_xx__grub
    script just wants the partition where the systemrescuecd iso is stored.


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Sat Sep 7 06:27:15 2019
    On 7/9/19 9:38 am, Bit Twister wrote:


    I am getting an error when selecting sysrescue in grub menu. Bits

    ^^^^^^^^^^^^^^^^^^^

    error: file "/isolinux/rescue64" not found

    error: you need to load the kernel first

    ***********************


    the internals of systemrescuecd have be altered

    I have the upgrade it seems

    systemrescuecd internals
    $ ls -l
    total 16
    drwxr-xr-x 3 nykysle nykysle 4096 Sep 7 15:08 boot/
    drwxr-xr-x 4 nykysle nykysle 4096 Sep 7 15:08 EFI/
    drwxr-xr-x 2 nykysle nykysle 4096 Sep 7 15:08 isolinux/
    drwxr-xr-x 4 nykysle nykysle 4096 Sep 7 15:08 sysresccd/



    ls -l isolinux
    total 172
    -r--r--r-- 1 nykysle nykysle 2048 Apr 14 21:35 boot.cat
    -rw-r--r-- 1 nykysle nykysle 432 Apr 14 21:32 isohdpfx.bin
    -rw-r--r-- 1 nykysle nykysle 38912 Apr 14 21:32 isolinux.bin
    -rw-r--r-- 1 nykysle nykysle 137 Apr 14 21:32 isolinux.cfg
    -rw-r--r-- 1 nykysle nykysle 119264 Apr 14 21:32 ldlinux.c32


    there is no "rescue64"

    this is becoming an epic thread, Bits :-)

    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Sat Sep 7 14:21:58 2019
    On Sat, 7 Sep 2019 15:27:15 +1000, faeychild wrote:
    On 7/9/19 9:38 am, Bit Twister wrote:


    I am getting an error when selecting sysrescue in grub menu. Bits

    ^^^^^^^^^^^^^^^^^^^

    error: file "/isolinux/rescue64" not found

    error: you need to load the kernel first

    ***********************

    Well, shame on me for not testing that the latest rescue cd boots
    with my custom grub script.

    I could not get it to locate the rescue iso with loop=/$_iso_fn so to get loop=/systemrescuecd.iso to latest download, my workaround is create
    a soft link from latest download to systemrescuecd.iso in my
    /spare partition.

    Read Assumptions: in script header.

    Watch out for any line wrap when saving script.

    - ---8<---8<---8<---8< cut/paste below this line-8<---8<---8<---8<---- #!/bin/sh
    exec tail -n +3 $0 #**********************************************************************
    #* 20b_rescue_cd_xx__grub - boots system rescue cd iso Version 1.0
    #* Iso can be found on http://www.sysresccd.org/Main_Page
    #*
    #* Reference material:
    #* http://www.system-rescue-cd.org/manual/Installing_SystemRescueCd_on_the_disk/ #* http://www.system-rescue-cd.org/manual/Booting_SystemRescueCd/
    #*
    #* Assumptions:
    #* downloaded systemrescuecd iso is in the "/spare" partition
    #* and the partition is labeled spare.
    #* If not change the _iso_loc variable to your labeled location.
    #*
    #* You have either saved the downloaded iso and moved/copied
    #* it to systemrescuecd.iso or just created a systemrescuecd.iso
    #* to the downloaded iso.
    #*
    #* Install procedure:
    #* save script in /etc/grub.d/ or set a link to actual location
    #* chmod +x /etc/grub.d/20b_rescue_cd_xx__grub
    #* and rebuild /boot/grub*/grub.cfg with
    #* update-grub
    #* or update-grub2 depending on your install
    #*
    #* Note: name of script dictates location in menu. Run
    #* ls -1 /etc/grub.d/*_* to see menu selection order.
    #*
    #* This is free software released to public domain. Do with it whatever you want.
    #*
    #**********************************************************************

    menuentry 'System Rescue ISO (64-bit) ' {
    insmod regexp
    insmod part_gpt
    insmod ext2
    _iso_loc=spare

    search --no-floppy --label $_iso_loc --set=root
    for _fn in systemrescuecd*.iso ; do
    _iso_fn=$_fn
    done

    loopback loop /$_iso_fn

    echo 'Loading kernel ...'
    linux (loop)/sysresccd/boot/x86_64/vmlinuz img_label=$_iso_loc loop=/systemrescuecd.iso archisobasedir=sysresccd copytoram setkmap=us dostartx
    echo 'Loading initramfs ...'
    initrd (loop)/sysresccd/boot/x86_64/sysresccd.img

    }

    #* cd /etc/grub.d/ ; make ; sleep 2 ; new_boot_logs

    #************************ end /etc/grub.d/20b_rescue_cd_xx__grub ***************

    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Sat Sep 7 22:40:18 2019
    On 7/9/19 11:21 pm, Bit Twister wrote:


    Well, shame on me for not testing that the latest rescue cd boots
    with my custom grub script.


    Someone is shifting the goalposts, Bits


    [root@unimatrix /]# update-grub2
    Generating grub configuration file ...
    Found theme: /boot/grub2/themes/maggy/theme.txt
    Found linux image: /boot/vmlinuz-5.2.10-desktop-1.mga7
    Found initrd image: /boot/initrd-5.2.10-desktop-1.mga7.img
    Found linux image: /boot/vmlinuz-5.2.7-desktop-1.mga7
    Found initrd image: /boot/initrd-5.2.7-desktop-1.mga7.img
    Found linux image: /boot/vmlinuz-desktop
    Found initrd image: /boot/initrd-desktop.img /etc/grub.d/20b_rescue_cd_xx__grub: line 3: syntax error near unexpected
    token `newline'
    /etc/grub.d/20b_rescue_cd_xx__grub: line 3: `> #**********************************************************************'




    Modified _iso_loc


    There is NO line wrapping in the actual script


    exec tail -n +3 $0
    #**********************************************************************
    #* 20b_rescue_cd_xx__grub - boots system rescue cd iso Version 1.0
    #* Iso can be found on http://www.sysresccd.org/Main_Page
    #*
    #* Reference material:
    #*
    http://www.system-rescue-cd.org/manual/Installing_SystemRescueCd_on_the_disk/
    #* http://www.system-rescue-cd.org/manual/Booting_SystemRescueCd/
    #*
    #* Assumptions:
    #* downloaded systemrescuecd iso is in the "/spare" partition
    #* and the partition is labeled spare.
    #* If not change the _iso_loc variable to your labeled location.
    #*
    #* You have either saved the downloaded iso and moved/copied
    #* it to systemrescuecd.iso or just created a systemrescuecd.iso
    #* to the downloaded iso.
    #*
    #* Install procedure:
    #* save script in /etc/grub.d/ or set a link to actual location
    #* chmod +x /etc/grub.d/20b_rescue_cd_xx__grub
    #* and rebuild /boot/grub*/grub.cfg with
    #* update-grub
    #* or update-grub2 depending on your install
    #*
    #* Note: name of script dictates location in menu. Run
    #* ls -1 /etc/grub.d/*_* to see menu selection order.
    #*
    #* This is free software released to public domain. Do with it
    whatever you want.
    #*
    #**********************************************************************

    menuentry 'System Rescue ISO (64-bit) ' {
    insmod regexp
    insmod part_gpt
    insmod ext2
    _iso_loc=sysrescue

    search --no-floppy --label $_iso_loc --set=root
    for _fn in systemrescuecd*.iso ; do
    _iso_fn=$_fn
    done

    loopback loop /$_iso_fn

    echo 'Loading kernel ...'
    linux (loop)/sysresccd/boot/x86_64/vmlinuz img_label=$_iso_loc
    loop=/systemrescuecd.iso archisobasedir=sysresccd copytoram setkmap=us dostartx
    echo 'Loading initramfs ...'
    initrd (loop)/sysresccd/boot/x86_64/sysresccd.img

    }

    #* cd /etc/grub.d/ ; make ; sleep 2 ; new_boot_logs



    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Sun Sep 8 00:20:22 2019
    On Sun, 8 Sep 2019 07:40:18 +1000, faeychild wrote:
    On 7/9/19 11:21 pm, Bit Twister wrote:

    There is NO line wrapping in the actual script


    exec tail -n +3 $0
    #**********************************************************************
    #* 20b_rescue_cd_xx__grub - boots system rescue cd iso Version 1.0

    Hehehe, you seem to have more problems than a two peckered cat.

    You missed the first line in your script "#!/bin/sh" .

    Check this snippet.
    #!/bin/sh
    exec tail -n +3 $0 #**********************************************************************
    #* 20b_rescue_cd_xx__grub - boots system rescue cd iso Version 1.0

    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Sun Sep 8 06:08:42 2019
    On 8/9/19 9:20 am, Bit Twister wrote:

    You missed the first line in your script "#!/bin/sh" .

    Check this snippet.
    #!/bin/sh
    exec tail -n +3 $0 #**********************************************************************
    #* 20b_rescue_cd_xx__grub - boots system rescue cd iso Version 1.0

    I cannot believe that I dropped that off!!!!

    ******************** It ran..

    update-grub2
    Generating grub configuration file ...
    Found theme: /boot/grub2/themes/maggy/theme.txt
    Found linux image: /boot/vmlinuz-5.2.10-desktop-1.mga7
    Found initrd image: /boot/initrd-5.2.10-desktop-1.mga7.img
    Found linux image: /boot/vmlinuz-5.2.7-desktop-1.mga7
    Found initrd image: /boot/initrd-5.2.7-desktop-1.mga7.img
    Found linux image: /boot/vmlinuz-desktop
    Found initrd image: /boot/initrd-desktop.img
    Sep 08 14:45:43 | DM multipath kernel driver not loaded
    done
    ********************************

    I now have two "20b_rescue_cd_xx__grub" entries in
    /boot/grub2/grub.cfg with the different layouts.

    I can delete the dud section later.
    But I can't reboot just now. I'm recording a stream.

    I'll have to let you know

    Regards


    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Sun Sep 8 08:02:42 2019
    On 8/9/19 3:08 pm, faeychild wrote:


    I've cleaned up the double entry in grub.cfg and it now boots and
    falls over with error messages.

    This is cut down version
    ****************8

    Firmware bug TSC Deadline disabled due to errata please update
    microcode version

    <Snip>

    ERROR mounting /dev/disk/by-lable/ to run/archiso/bootmnt

    then waits 30 sec for /dev/disk/by-lable/
    device did not show up fall back to prompt

    sh can't access tty job control turned of

    ***************************

    The USB stick still works. it's not all lost


    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Sun Sep 8 10:39:27 2019
    On Sun, 8 Sep 2019 15:08:42 +1000, faeychild wrote:
    On 8/9/19 9:20 am, Bit Twister wrote:

    You missed the first line in your script "#!/bin/sh" .

    Check this snippet.
    #!/bin/sh
    exec tail -n +3 $0
    #**********************************************************************
    #* 20b_rescue_cd_xx__grub - boots system rescue cd iso Version 1.0

    I cannot believe that I dropped that off!!!!

    ******************** It ran..

    update-grub2

    I now have two "20b_rescue_cd_xx__grub" entries in
    /boot/grub2/grub.cfg with the different layouts.

    Then I have to guess you have two rescue_cd_xx_ files in /etc/grub.d/.
    There should only be one script.

    I can delete the dud section later.

    Nope. editing /boot/grub2/grub.cfg is a band aid fix.
    You need to fix whatever is causing the cut.

    If there is only one rescue_cd_xx script then my suggestion is delete
    the rescue script in /etc/grub.d/ get a fresh copy,
    set execute permission bit and run update-grub2 again.

    Quick menuentry check without booting
    grep 'System Rescue' /boot/grub2/grub.cfg


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Sun Sep 8 22:00:03 2019
    On 8/9/19 7:39 pm, Bit Twister wrote:


    I now have two "20b_rescue_cd_xx__grub" entries in
    /boot/grub2/grub.cfg with the different layouts.

    Then I have to guess you have two rescue_cd_xx_ files in /etc/grub.d/.
    There should only be one script.

    Replaced 20b_rescue_cd_xx__grub in grub.d with latest version.

    grub.d]$ ls -l
    total 72
    -rwxr-xr-x 1 root root 8703 May 12 03:21 00_header*
    -rwxr-xr-x 1 root root 236 May 12 03:21 01_users*
    -rwxr-xr-x 1 root root 10594 May 12 03:22 10_linux*
    -rwxrwxr-x 1 root root 2004 Sep 8 14:45 20b_rescue_cd_xx__grub*
    -rwxr-xr-x 1 root root 10487 May 12 03:21 20_linux_xen*
    -rwxr-xr-x 1 root root 2562 May 12 03:21 20_ppc_terminfo*
    -rwxr-xr-x 1 root root 11817 May 12 03:21 30_os-prober*
    -rwxr-xr-x 1 root root 218 May 12 03:21 40_custom*
    -rwxr-xr-x 1 root root 220 May 12 03:21 41_custom*
    -rw-r--r-- 1 root root 483 May 22 2015 README




    If there is only one rescue_cd_xx script then my suggestion is delete
    the rescue script in /etc/grub.d/ get a fresh copy,
    set execute permission bit and run update-grub2 again.

    Done!!

    grep 'System Rescue' /boot/grub2/grub.cfg
    menuentry 'System Rescue ISO (64-bit) ' {


    *************************
    ERROR mounting /dev/disk/by-lable/ to run/archiso/bootmnt

    then waits 30 sec for /dev/disk/by-lable/
    device did not show up fall back to prompt

    sh can't access tty job control turned of
    ****************************

    /dev/disk/by-lable/ does not look good, Bits

    Reagards
    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Sun Sep 8 22:30:35 2019
    On Mon, 9 Sep 2019 07:00:03 +1000, faeychild wrote:
    On 8/9/19 7:39 pm, Bit Twister wrote:


    I now have two "20b_rescue_cd_xx__grub" entries in
    /boot/grub2/grub.cfg with the different layouts.

    Then I have to guess you have two rescue_cd_xx_ files in /etc/grub.d/.
    There should only be one script.

    Replaced 20b_rescue_cd_xx__grub in grub.d with latest version.

    grub.d]$ ls -l
    total 72
    -rwxr-xr-x 1 root root 8703 May 12 03:21 00_header*
    -rwxr-xr-x 1 root root 236 May 12 03:21 01_users*
    -rwxr-xr-x 1 root root 10594 May 12 03:22 10_linux*
    -rwxrwxr-x 1 root root 2004 Sep 8 14:45 20b_rescue_cd_xx__grub*
    -rwxr-xr-x 1 root root 10487 May 12 03:21 20_linux_xen*
    -rwxr-xr-x 1 root root 2562 May 12 03:21 20_ppc_terminfo*
    -rwxr-xr-x 1 root root 11817 May 12 03:21 30_os-prober*
    -rwxr-xr-x 1 root root 218 May 12 03:21 40_custom*
    -rwxr-xr-x 1 root root 220 May 12 03:21 41_custom*
    -rw-r--r-- 1 root root 483 May 22 2015 README




    If there is only one rescue_cd_xx script then my suggestion is delete
    the rescue script in /etc/grub.d/ get a fresh copy,
    set execute permission bit and run update-grub2 again.

    Done!!

    grep 'System Rescue' /boot/grub2/grub.cfg
    menuentry 'System Rescue ISO (64-bit) ' {


    *************************
    ERROR mounting /dev/disk/by-lable/ to run/archiso/bootmnt

    then waits 30 sec for /dev/disk/by-lable/
    device did not show up fall back to prompt

    sh can't access tty job control turned of
    ****************************

    /dev/disk/by-lable/ does not look good, Bits

    Hmmmmm, other than hardware and iso location, the iso works for both
    of us. That leaves the iso location partition name as the last suspect
    it this Who Done It mystery.

    If your sysresccd.iso is a /sysresccd partition, then you need to
    change the partition name and label to something like sysRcd and
    update /etc/fstab and _iso_loc in 20b_rescue_cd_xx__grub and run
    update-grub2

    Oh, yeah, I do not know if you also removed the files you had copied
    off the .iso or not. All I have on my system is the iso

    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Sun Sep 8 23:04:01 2019
    On 9/9/19 7:30 am, Bit Twister wrote:


    Hmmmmm, other than hardware and iso location, the iso works for both
    of us. That leaves the iso location partition name as the last suspect
    it this Who Done It mystery.


    Correct


    If your sysresccd.iso is a /sysresccd partition, then you need to

    The "systemrescuecd-6.0.3.iso" is on the sysrescue partition

    change the partition name and label to something like sysRcd and
    update /etc/fstab and _iso_loc in 20b_rescue_cd_xx__grub and run
    update-grub2

    I'll try that a bit laterr

    Oh, yeah, I do not know if you also removed the files you had copied
    off the .iso or not. All I have on my system is the iso


    Yes They're gone. Only systemrescuecd-6.0.3.iso now.


    Sysrescue partition is not listed in fstab and not mounted/mounting -
    should it be?


    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Mon Sep 9 00:56:49 2019
    On Mon, 9 Sep 2019 08:04:01 +1000, faeychild wrote:
    On 9/9/19 7:30 am, Bit Twister wrote:


    Hmmmmm, other than hardware and iso location, the iso works for both
    of us. That leaves the iso location partition name as the last suspect
    it this Who Done It mystery.


    Correct


    If your sysresccd.iso is a /sysresccd partition, then you need to

    The "systemrescuecd-6.0.3.iso" is on the sysrescue partition

    Ok, I was worried it was sysresccd, if it is not, then that is
    not the problem.

    change the partition name and label to something like sysRcd and
    update /etc/fstab and _iso_loc in 20b_rescue_cd_xx__grub and run
    update-grub2

    I'll try that a bit laterr

    Oh, yeah, I do not know if you also removed the files you had copied
    off the .iso or not. All I have on my system is the iso


    Yes They're gone. Only systemrescuecd-6.0.3.iso now.

    Ah, hopefully you followed my instructions, and created a soft link as indicated in my new/improved script.


    Sysrescue partition is not listed in fstab and not mounted/mounting -
    should it be?

    No, grub2 will do the mounting when it goes hunting for the iso name
    during boot if you select the rescue iso.



    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Mon Sep 9 02:48:22 2019
    On 9/9/19 9:56 am, Bit Twister wrote:
    On Mon, 9 Sep 2019 08:04:01 +1000, faeychild wrote:
    On 9/9/19 7:30 am, Bit Twister wrote:


    Hmmmmm, other than hardware and iso location, the iso works for both
    of us. That leaves the iso location partition name as the last suspect
    it this Who Done It mystery.

    Based on personal experience
    I just know the problem is going to be something really really stupid :-)


    ******Whom gods wish to destroy, they first send mad******


    Ah, hopefully you followed my instructions, and created a soft link as indicated in my new/improved script.


    ***********************
    #Install procedure:
    #* save script in /etc/grub.d/ or set a link to actual location ***********************

    I put it directly in grub.d

    [faeychild@unimatrix grub.d]$ ls -l
    total 72
    -rwxr-xr-x 1 root root 8703 May 12 03:21 00_header*
    -rwxr-xr-x 1 root root 236 May 12 03:21 01_users*
    -rwxr-xr-x 1 root root 10594 May 12 03:22 10_linux*
    -rwxrwxr-x 1 root root 2004 Sep 8 14:45 20b_rescue_cd_xx__grub*
    -rwxr-xr-x 1 root root 10487 May 12 03:21 20_linux_xen*
    -rwxr-xr-x 1 root root 2562 May 12 03:21 20_ppc_terminfo*
    -rwxr-xr-x 1 root root 11817 May 12 03:21 30_os-prober*
    -rwxr-xr-x 1 root root 218 May 12 03:21 40_custom*
    -rwxr-xr-x 1 root root 220 May 12 03:21 41_custom*
    -rw-r--r-- 1 root root 483 May 22 2015 README


    and ran update-grub2




    This is the Grub.cfg entry

    ### END /etc/grub.d/10_linux ###

    ### BEGIN /etc/grub.d/20b_rescue_cd_xx__grub ### #**********************************************************************
    #* 20b_rescue_cd_xx__grub - boots system rescue cd iso Version 1.0
    #* Iso can be found on http://www.sysresccd.org/Main_Page
    #*
    #* Reference material:
    #* http://www.system-rescue-cd.org/manual/Installing_SystemRescueCd_on_the_disk/ #* http://www.system-rescue-cd.org/manual/Booting_SystemRescueCd/
    #*
    #* Assumptions:
    #* downloaded systemrescuecd iso is in the "/spare" partition
    #* and the partition is labeled spare.
    #* If not change the _iso_loc variable to your labeled location.
    #*
    #* You have either saved the downloaded iso and moved/copied
    #* it to systemrescuecd.iso or just created a systemrescuecd.iso
    #* to the downloaded iso.
    #*
    #* Install procedure:
    #* save script in /etc/grub.d/ or set a link to actual location
    #* chmod +x /etc/grub.d/20b_rescue_cd_xx__grub
    #* and rebuild /boot/grub*/grub.cfg with
    #* update-grub
    #* or update-grub2 depending on your install
    #*
    #* Note: name of script dictates location in menu. Run
    #* ls -1 /etc/grub.d/*_* to see menu selection order.
    #*
    #* This is free software released to public domain. Do with it whatever
    you want.
    #*
    #**********************************************************************

    menuentry 'System Rescue ISO (64-bit) ' {
    insmod regexp
    insmod part_gpt
    insmod ext2
    _iso_loc=sysrescue

    search --no-floppy --label $_iso_loc --set=root
    for _fn in systemrescuecd*.iso ; do
    _iso_fn=$_fn
    done

    loopback loop /$_iso_fn

    echo 'Loading kernel ...'
    linux (loop)/sysresccd/boot/x86_64/vmlinuz img_label=$_iso_loc loop=/systemrescuecd.iso archisobasedir=sysresccd copytoram setkmap=us dostartx
    echo 'Loading initramfs ...'
    initrd (loop)/sysresccd/boot/x86_64/sysresccd.img

    }

    #* cd /etc/grub.d/ ; make ; sleep 2 ; new_boot_logs

    #************************ end /etc/grub.d/20b_rescue_cd_xx__grub ***************
    ### END /etc/grub.d/20b_rescue_cd_xx__grub ###



    somewhat preoccupied for a while today Bits

    Ill be back with more detailed info


    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Mon Sep 9 05:27:51 2019
    On 9/9/19 11:48 am, faeychild wrote:

    A new approach
    Similar

    I have followed the systemrescuecd page instructions

    A slightly different script and a different position for
    systemrescuecd.iso -- in /boot.

    Once again I can't try it immediately, I'm rendering video and will wait
    till it ends.

    Reagards

    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Mon Sep 9 10:54:26 2019
    On Mon, 9 Sep 2019 14:27:51 +1000, faeychild wrote:
    On 9/9/19 11:48 am, faeychild wrote:

    A new approach
    Similar

    I have followed the systemrescuecd page instructions

    A slightly different script and a different position for
    systemrescuecd.iso -- in /boot.

    Do have fun, I used the same page to get my script to run.

    Do keep in mind, http://www.system-rescue-cd.org/manual/Installing_SystemRescueCd_on_the_disk/ requires you to have a partition labeled boot.

    Since mine worked, I did not use
    load_video
    insmod gzio
    insmod part_gpt


    --- MBSE BBS v1.0.7.12 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Jim Beard@2:250/1 to All on Mon Sep 9 14:38:29 2019
    On Mon, 09 Sep 2019 07:00:03 +1000, faeychild wrote:

    On 8/9/19 7:39 pm, Bit Twister wrote:


    I now have two "20b_rescue_cd_xx__grub" entries in
    /boot/grub2/grub.cfg with the different layouts.

    Then I have to guess you have two rescue_cd_xx_ files in /etc/grub.d/.
    There should only be one script.
    <snip>
    -rwxrwxr-x 1 root root 2004 Sep 8 14:45 20b_rescue_cd_xx__grub*

    *************************
    ERROR mounting /dev/disk/by-lable/ to run/archiso/bootmnt

    then waits 30 sec for /dev/disk/by-lable/
    device did not show up fall back to prompt

    sh can't access tty job control turned of ****************************

    /dev/disk/by-lable/ does not look good, Bits

    Reagards

    Odd question: "/dev/disk/by-lable

    There is a typo somewhere. /dev/disk/by-label might work better.

    Cheers!

    jim b.


    --
    UNIX is not user-unfriendly, it merely expects users to be computer-
    friendly.

    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Mon Sep 9 19:05:55 2019
    On Mon, 9 Sep 2019 13:38:29 -0000 (UTC), Jim Beard wrote:
    On Mon, 09 Sep 2019 07:00:03 +1000, faeychild wrote:

    On 8/9/19 7:39 pm, Bit Twister wrote:


    I now have two "20b_rescue_cd_xx__grub" entries in
    /boot/grub2/grub.cfg with the different layouts.

    Then I have to guess you have two rescue_cd_xx_ files in /etc/grub.d/.
    There should only be one script.
    <snip>
    -rwxrwxr-x 1 root root 2004 Sep 8 14:45 20b_rescue_cd_xx__grub*

    *************************
    ERROR mounting /dev/disk/by-lable/ to run/archiso/bootmnt

    then waits 30 sec for /dev/disk/by-lable/
    device did not show up fall back to prompt

    sh can't access tty job control turned of ****************************

    /dev/disk/by-lable/ does not look good, Bits

    Reagards

    Odd question: "/dev/disk/by-lable

    There is a typo somewhere. /dev/disk/by-label might work better.

    Typeo was caused by the unit between the keyboard and chair.

    OP, has booted the iso, and vmlinuz is processing the command line.
    The bug I found was the processing of img_loop argument in the
    img_label=$_iso_loc img_loop=/systemrescuecd.iso
    snippet.

    Work around was to either rename the downloaded iso to systemrescuecd.iso
    or create a soft link to the downloaded iso. Since I need to know the
    current release iso at a glance I went with the link.

    $ ls -l sys*
    snip May 17 04:31 systemrescuecd-6.0.3.iso
    snip 24 Sep 9 05:47 systemrescuecd.iso -> systemrescuecd-6.0.3.iso

    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Mon Sep 9 22:44:49 2019
    On 9/9/19 7:54 pm, Bit Twister wrote:

    A slightly different script and a different position for
    systemrescuecd.iso -- in /boot.

    Do have fun, I used the same page to get my script to run.

    Do keep in mind,

    http://www.system-rescue-cd.org/manual/Installing_SystemRescueCd_on_the_disk/
    requires you to have a partition labeled boot.


    Mine didn't


    [root@unimatrix ~]# ls -l /boot
    total 931084
    <snip>
    1.mga7
    -rw-r--r-- 1 root root 4090537 Aug 7 22:12
    System.map-5.2.7-desktop-1.mga7
    -rwxrwxr-x 1 root root 881852416 Sep 9 06:05 systemrescuecd.iso*
    lrwxrwxrwx 1 root root 29 Sep 3 11:48 vmlinuz -> vmlinuz-5.2.10-desktop-1.mga7

    <snip>


    grub.d]$ ls -l
    total 72
    -rwxr-xr-x 1 root root 8703 May 12 03:21 00_header*
    -rwxr-xr-x 1 root root 236 May 12 03:21 01_users*
    -rwxr-xr-x 1 root root 10594 May 12 03:22 10_linux*
    -rwxr-xr-x 1 root root 10487 May 12 03:21 20_linux_xen*
    -rwxr-xr-x 1 root root 2562 May 12 03:21 20_ppc_terminfo*
    -rwxrwxr-x 1 root root 504 Sep 9 14:18 25_sysresccd*
    -rwxr-xr-x 1 root root 11817 May 12 03:21 30_os-prober*
    -rwxr-xr-x 1 root root 218 May 12 03:21 40_custom*
    -rwxr-xr-x 1 root root 220 May 12 03:21 41_custom*
    -rw-r--r-- 1 root root 483 May 22 2015 README



    cat 25_sysresccd*

    #!/bin/sh
    exec tail -n +3 $0

    menuentry "SystemRescueCd (isoloop)" {
    load_video
    insmod gzio
    insmod part_gpt
    insmod part_msdos
    insmod ext2
    search --no-floppy --label boot --set=root
    loopback loop /systemrescuecd.iso
    echo 'Loading kernel ...'
    linux (loop)/sysresccd/boot/x86_64/vmlinuz img_label=boot img_loop=/systemrescuecd.iso archisobasedir=sysresccd copytoram setkmap=us
    echo 'Loading initramfs ...'
    initrd (loop)/sysresccd/boot/x86_64/sysresccd.img
    }


    cat grub.cfg


    ### END /etc/grub.d/20_ppc_terminfo ###

    ### BEGIN /etc/grub.d/25_sysresccd ###

    menuentry "SystemRescueCd (isoloop)" {
    load_video
    insmod gzio
    insmod part_gpt
    insmod part_msdos
    insmod ext2
    search --no-floppy --label boot --set=root
    loopback loop /systemrescuecd.iso
    echo 'Loading kernel ...'
    linux (loop)/sysresccd/boot/x86_64/vmlinuz img_label=boot img_loop=/systemrescuecd.iso archisobasedir=sysresccd copytoram setkmap=us
    echo 'Loading initramfs ...'
    initrd (loop)/sysresccd/boot/x86_64/sysresccd.img
    }
    ### END /etc/grub.d/25_sysresccd ###


    ****boot error message****

    error: no such device: boot
    error: file "/systemrescuecd.iso" not found
    Loading kernel
    error: no server is specified
    loading initramfs ..
    error: you need to load the kernel first



    And as you pointed out. It runs fine off the USB stick

    regards


    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Mon Sep 9 23:00:29 2019
    On Tue, 10 Sep 2019 07:44:49 +1000, faeychild wrote:
    On 9/9/19 7:54 pm, Bit Twister wrote:


    Do keep in mind,
    http://www.system-rescue-cd.org/manual/Installing_SystemRescueCd_on_the_disk/ >> requires you to have a partition labeled boot.


    Mine didn't

    Nope, no gold star for you. :)

    search --no-floppy --label boot --set=root

    The above line instructs grub to scan all partitions on all media,
    except floppy, for a partition containing the label "boot"

    https://www.gnu.org/software/grub/manual/grub/grub.html#search



    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Mon Sep 9 23:02:20 2019
    On 9/9/19 7:54 pm, Bit Twister wrote:

    Do have fun, I used the same page to get my script to run.

    Do keep in mind,

    http://www.system-rescue-cd.org/manual/Installing_SystemRescueCd_on_the_disk/
    requires you to have a partition labeled boot.

    The page says to copy the ISO into /boot and not just a partition named
    boot.
    And every installation has "/boot"

    Not that it works anyway.. How well tested was this instruction.

    Re your soft link, Bits

    How does installing the ISO directly or using a link make any difference??


    This will have to be my next attempt- I may try Jim's typo

    I need a coffee break

    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Mon Sep 9 23:43:50 2019
    On 10/9/19 8:00 am, Bit Twister wrote:
    On Tue, 10 Sep 2019 07:44:49 +1000, faeychild wrote:
    On 9/9/19 7:54 pm, Bit Twister wrote:


    Do keep in mind,
    http://www.system-rescue-cd.org/manual/Installing_SystemRescueCd_on_the_disk/ >>> requires you to have a partition labeled boot.


    Mine didn't
    error this didn't refer to boot

    Nope, no gold star for you. :)

    search --no-floppy --label boot --set=root

    The above line instructs grub to scan all partitions on all media,
    except floppy, for a partition containing the label "boot"
    or in your script the variable $_iso_loc

    So it should find the regular "/boot" partition where I installed the ISO

    Tthe error message was no such device: boot
    If the scan starts at "/" it did not find the "/boot" partition

    ls -l /
    total 144
    lrwxrwxrwx 1 root root 7 Sep 24 2018 bin -> usr/bin/

    *****drwxr-xr-x 5 root root 4096 Sep 9 14:15 boot/

    drwxr-xr-x 2 root root 4096 Sep 6 09:26 cgroup/
    -rw------- 1 root root 49192 Sep 10 08:12 dead.letter
    drwxr-xr-x 21 root root 4180 Sep 10 07:47 dev/
    drwxr-xr-x 120 root root 12288 Sep 9 18:15 etc/
    drwxr-xr-x 4 root root 4096 Aug 31 07:46 home/
    drwxr-xr-x 2 root root 4096 Sep 24 2018 initrd/


    https://www.gnu.org/software/grub/manual/grub/grub.html#search

    Bookmarked into manuals folder




    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Tue Sep 10 00:17:55 2019
    On Tue, 10 Sep 2019 08:02:20 +1000, faeychild wrote:

    Everyone should have some ideal about programming just to see what
    it is and what it is not.

    What it is, is: Casting mystical spells in terminology,
    whose exact details have exact ramifications.

    What it is not, is: Talking or typing to the computer in some way
    that it requires intelligence by the machine.

    What it is, is: An intricate technical art.

    What it is not is: A Science.



    The page says to copy the ISO into /boot and not just a partition named
    boot.


    Say What! I am quoting from http://www.system-rescue-cd.org/manual/Installing_SystemRescueCd_on_the_disk/

    "Here is an example of a Grub2 configuration section assuming the
    filesystem which contains systemrescuecd.iso is labelled boot. "


    And every installation has "/boot"

    And grub will find it if /boot is in a partition labeled "boot". Yours is not. The label of the partition where /boot is on your system is MGA7

    Not that it works anyway.. How well tested was this instruction.

    Re your soft link, Bits

    How does installing the ISO directly or using a link make any difference??

    It is all in the name. My script hunted down the downloaded iso.

    This line of code
    linux (loop)/sysresccd/boot/x86_64/vmlinuz \
    img_label=boot img_loop=/systemrescuecd.iso \
    archisobasedir=sysresccd copytoram setkmap=us

    tells (loop)/sysresccd/boot/x86_64/vmlinuz to search a partition
    with the label=boot for a file named img_loop=/systemrescuecd.iso

    That is why I had to create a link systemrescuecd.iso to my downloaded
    iso to get my script to run.



    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Tue Sep 10 02:09:52 2019
    On Mon, 9 Sep 2019 18:17:55 -0500, Bit Twister wrote:
    On Tue, 10 Sep 2019 08:02:20 +1000, faeychild wrote:

    And every installation has "/boot"

    And grub will find it if /boot is in a partition labeled "boot". Yours is
    not.
    The label of the partition where /boot is on your system is MGA7

    You would have to have the iso in / and set img_label=MGA7



    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Tue Sep 10 06:49:50 2019
    On 10/9/19 11:09 am, Bit Twister wrote:
    On Mon, 9 Sep 2019 18:17:55 -0500, Bit Twister wrote:


    And grub will find it if /boot is in a partition labeled "boot". Yours is not.
    The label of the partition where /boot is on your system is MGA7

    You would have to have the iso in / and set img_label=MGA7



    CLICK!! that's when the penny dropped. I can be so stupid when I work
    on it.

    My mindset was stuck in "/" and not the partition it's on


    Your explanation of the linux (loop) instruction was instrumental in
    solving my problem.

    I get a sense of despair trying to follow nested recursive instruction
    sets particularly using variables

    I renamed the "sysrescue" partition to "boot"
    Copied the "sysrescuecd.iso" into "boot"

    I updated grub with the systemrescue 25_rescue_cd_grub file.

    It worked.

    I don't understand why other set up failed
    I don't know why I failed with your version.



    But now I'm brimming with confidence I can look into it.
    how could it go wrong.....

    Regards

    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Tue Sep 10 13:41:38 2019
    On Tue, 10 Sep 2019 15:49:50 +1000, faeychild wrote:

    I renamed the "sysrescue" partition to "boot"
    Copied the "sysrescuecd.iso" into "boot"

    Just to keep Murphy out of the loop, I would not be using "boot" as
    a partition label.

    Entirely possible that will bite you down the road at some point.


    I updated grub with the systemrescue 25_rescue_cd_grub file.

    It worked.

    Question, does yours boot into graphical screen or do you have to
    enter startx?


    I don't understand why other set up failed
    I don't know why I failed with your version.

    Because you need to have the iso "sysrescuecd.iso" or a "sysrescuecd.iso"
    link. In my case I want to know the version being used so I use a link.

    # cd /spare
    # ls -al systemrescue*
    snip systemrescuecd-6.0.3.iso
    snip systemrescuecd.iso -> systemrescuecd-6.0.3.iso

    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Tue Sep 10 23:02:47 2019
    On 10/9/19 10:41 pm, Bit Twister wrote:
    On Tue, 10 Sep 2019 15:49:50 +1000, faeychild wrote:

    I renamed the "sysrescue" partition to "boot"
    Copied the "sysrescuecd.iso" into "boot"

    Just to keep Murphy out of the loop, I would not be using "boot" as
    a partition label.

    Entirely possible that will bite you down the road at some point.


    Yes! This is why I originally went for "sysres"
    I may have to tinker



    Question, does yours boot into graphical screen or do you have to
    enter startx?

    I have to startx. The same with the CD or USB stick



    Thanks Bits

    You take a rest now. :-)

    regards

    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Tue Sep 10 23:27:58 2019
    On Wed, 11 Sep 2019 08:02:47 +1000, faeychild wrote:

    You take a rest now. :-)

    Which gets us back to the fstab_changes script.

    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Wed Sep 11 02:42:51 2019
    On 11/9/19 8:27 am, Bit Twister wrote:
    On Wed, 11 Sep 2019 08:02:47 +1000, faeychild wrote:

    You take a rest now. :-)

    Which gets us back to the fstab_changes script.



    Ah Ha !


    My current fstab was manually edited when dinking around with rescue grub.


    cat /etc/fstab
    #/dev/nvme0n1p2 / ext4 noatime,acl 1 1
    LABEL=MG7 / ext4 noatime,acl 1 1
    /dev/nvme0n1p1 /boot/EFI vfat umask=000,iocharset=utf8 0 0
    none /proc proc defaults 0 0
    #/dev/nvme0n1p4 /tmp ext4 noatime,acl 1 2
    LABEL=tmp /tmp ext4 noatime,acl 1 2
    # Entry for /dev/sda1 :
    #UUID=ddce96e5-77d9-45dd-b1c7-4bf10d42fff7 /video ext4 noatime,acl 1 2\ LABEL=data /video ext4 noatime,acl 1 2
    #/dev/nvme0n1p3 swap swap defaults 0 0
    LABEL=swap swap swap defaults 0 0



    /tmp and EFI are the partitions still not labeled.

    Should we continue?

    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Wed Sep 11 06:04:12 2019
    On 11/9/19 11:42 am, faeychild wrote:


    Which gets us back to the fstab_changes script.



    Ah Ha !


    My current fstab was manually edited when dinking around with rescue grub.


    cat /etc/fstab
    #/dev/nvme0n1p2 / ext4 noatime,acl 1 1
    LABEL=MG7 / ext4 noatime,acl 1 1
    /dev/nvme0n1p1 /boot/EFI vfat umask=000,iocharset=utf8 0 0
    none /proc proc defaults 0 0
    #/dev/nvme0n1p4 /tmp ext4 noatime,acl 1 2
    LABEL=tmp /tmp ext4 noatime,acl 1 2
    # Entry for /dev/sda1 :
    #UUID=ddce96e5-77d9-45dd-b1c7-4bf10d42fff7 /video ext4 noatime,acl 1 2\ LABEL=data /video ext4 noatime,acl 1 2
    #/dev/nvme0n1p3 swap swap defaults 0 0
    LABEL=swap swap swap defaults 0 0



    /tmp and EFI are the partitions still not labeled.

    Should we continue?

    the curiosity got the better of me, Bits


    Reinstall]$ ./fstab-label.sh #********************************************************************
    #* /etc/fstab
    #* Created by ./fstab-label.sh Wed 11 Sep 14:57 2019
    #*
    #********************************************************************
    LABEL=MG7 / ext4 noatime,acl 1 1
    /dev/nvme0n1p1 /boot/EFI vfat umask=000,iocharset=utf8 0 0
    none /proc proc defaults 0 0
    LABEL=tmp /tmp ext4 noatime,acl 1 2
    LABEL=swap swap swap defaults 0 0
    #****************** end /etc/fstab ******************

    You need to be root to actually overwrite /etc/fstab

    removed '/home/faeychild/tmp/fstab-label.sh.tmp'
    removed '/home/faeychild/tmp/fstab'



    It didn't redress
    LABEL=data /video ext4 noatime,acl 1 2

    regards
    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Wed Sep 11 10:49:02 2019
    On Wed, 11 Sep 2019 11:42:51 +1000, faeychild wrote:
    On 11/9/19 8:27 am, Bit Twister wrote:
    On Wed, 11 Sep 2019 08:02:47 +1000, faeychild wrote:

    You take a rest now. :-)

    Which gets us back to the fstab_changes script.



    Ah Ha !


    My current fstab was manually edited when dinking around with rescue grub.


    cat /etc/fstab
    #/dev/nvme0n1p2 / ext4 noatime,acl 1 1
    LABEL=MG7 / ext4 noatime,acl 1 1
    /dev/nvme0n1p1 /boot/EFI vfat umask=000,iocharset=utf8 0 0
    none /proc proc defaults 0 0
    #/dev/nvme0n1p4 /tmp ext4 noatime,acl 1 2
    LABEL=tmp /tmp ext4 noatime,acl 1 2
    # Entry for /dev/sda1 :
    #UUID=ddce96e5-77d9-45dd-b1c7-4bf10d42fff7 /video ext4 noatime,acl 1 2\

    Just for fun, remove that trailing backslash on the end of that line.
    It should NOT be there.
    Hopefully that is what screwed up my fstab_changes script.

    LABEL=data /video ext4 noatime,acl 1 2
    #/dev/nvme0n1p3 swap swap defaults 0 0
    LABEL=swap swap swap defaults 0 0



    /tmp and EFI are the partitions still not labeled.

    Hmmm, I see LABEL=tmp /tmp ext4 noatime,acl 1 2 :)

    It dawned on me why you could not use gparted to label /boot/EFI.
    Partition code is EFI not vfat and that caused gparted to hang.

    I am still recommending mount point and partition name to be changed.
    Suggest efi_boot or just efi.

    I believe in an ounce of prevention is worth more than a pound of cure.
    I would not want something in the future clobbering your
    linux /boot partition. :(

    Should we continue?

    It is up to you. I thought we started down this road when we were
    discussing backups and testing.

    My backup script, reads volume/media label, mounts it as /src, adds _bk,
    mounts the backup target as /dest, and does the rsync args /src/ /dest

    Since you have chosen not to set label/partition same as /video mount
    point that might cause problems down the road and causes any scripts to
    keep that in mind. :-(

    In other words, if you decide to change label to video, and create another partition and label it data, all scripts would need to be changed that
    depended on data and /video being the same partition.

    After you think you have settled on names and whatnot I would like to
    see the results from

    lsblk -io NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT,LABEL,PARTLABEL


    Going to see why my fstab_changes script did not work correctly.

    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Wed Sep 11 11:54:12 2019
    On Wed, 11 Sep 2019 15:04:12 +1000, faeychild wrote:
    On 11/9/19 11:42 am, faeychild wrote:

    /tmp and EFI are the partitions still not labeled.

    Should we continue?

    Why not, someone may come along and want a working copy. :)
    Delete your copy, and try this new and improved attempt. ----8<----8<----8<--cut below this line --8<----8<----8<
    #!/bin/bash
    #**************************************************************
    #*
    #* fstab_changes - change fstab to use labels Version 1.0
    #*
    #* creates a /etc/fstab_bkup if does not exists.
    #*
    #* Converts all entries to LABEL=xxx or PARTLABEL=xxx if partition
    #* has a volume/media label or a partition name.
    #*
    #* Any line starting with a # character is stripped from output.
    #*
    #* Assumptions:
    #* All volume/media labels, partition names, UUIDs are unique.
    #*
    #* This is free software released to public domain.
    #* Do with it whatever you want.
    #*
    #* If it breaks your system, you get to keep all broken pieces.
    #*
    #**************************************************************

    PATH=/usr/local/sbin:/sbin:/usr/sbin:/usr/bin:/bin

    _cmd_line_args="$*"
    _exe=$0
    _app=${0##*/}
    _user=$(id --user --name )
    TMP=$(getent passwd $_user | awk -F: '{print $(NF - 1)}')/tmp

    set -u # Show usage of unset variables as an error to help catch typos.

    _char1=""
    _created_by="Created by $_exe $(date '+%a %d %b %H:%M %Y')"
    _dev=""
    _fn_in=/etc/fstab
    _fn_bkup=${_fn_in}_bkup
    _fn_fault=$TMP/$_app.fault
    _fn_out=$TMP/fstab
    _fn_tmp=$TMP/$_app.tmp
    _label=""
    _line_in=""
    _line_out=""
    _mount_pt=""
    _rest_line=""
    _wd1=""

    function parse_command_line ()
    {
    set -- $_cmd_line_args
    if [ $# -ne 0 ] ; then
    head -21 $_exe
    exit 0
    fi
    } # end function parse_command_line

    function get_vol_name ()
    {
    _dev=$_wd1
    if [ "$_char1" = "U" ] ; then # get /dev/xxx
    _label_line=$_line_in # just in case not labeled
    set -- ${_line_in#*UUID=}
    _dev=$(findfs UUID="$1" 2> $_fn_tmp)
    if [ $? -ne 0 ] ; then
    echo "findfs UUID=\"$1\" FAILURE" >> $_fn_fault
    cat $_fn_tmp >> $_fn_fault
    rm --force $_fn_tmp
    fi
    fi

    _label=$(blkid -o value -s LABEL $_dev)
    if [ -n "$_label" ] ; then
    _line_out="LABEL=$_label $_rest_line"
    else
    _label=$(blkid -o value -s PARTLABEL $_dev)
    if [ -n "$_label" ] ; then
    _line_out="PARTLABEL=$_label $_rest_line"
    fi
    fi

    } # end function get_vol_name

    function parse_line_in ()
    {
    _char1=""
    set -- $_line_in # parse line into $n arguments
    if [ $# -eq 0 ] ; then # empty line nothing to parse
    return
    fi

    _char1=${_line_in:0:1} # save first char of first word
    if [ $_char1 = '#' ] ; then # it is a comment pass it through
    return
    fi

    _wd1=$1 # save word 1 of line (IE. UUID=xxx)
    _mount_pt=$2 # save word 2 of line (mount point)

    shift # remove first word on line (xxxx=yyy)
    _rest_line="$*"
    get_vol_name

    } # end function parse_line_in

    #************************************
    #* main code start here
    #************************************

    parse_command_line
    mkdir --parents $TMP
    rm --force $_fn_fault $_fn_tmp

    echo "#********************************************************************" > $_fn_out
    echo "#* $_fn_in" >> $_fn_out
    echo "#* $_created_by" >> $_fn_out
    echo "#* " >> $_fn_out
    echo "#********************************************************************" >> $_fn_out

    while read _line_in ; do
    _line_out=$_line_in
    parse_line_in # parse line into _wd1 and _mount_pt
    if [ "$_char1" != "#" ] ; then
    echo $_line_out >> $_fn_out
    fi
    done < $_fn_in

    echo "#****************** end $_fn_in ******************" >> $_fn_out

    if [ -e $_fn_fault ] ; then
    echo -e "\n\t # $_fn_fault from $_exe" >> $_fn_fault
    cat $_fn_fault
    exit 1
    fi

    if [ $_user = "root" ] ; then
    if [ ! -e $_fn_bkup ] ; then # create a backup copy
    cp --verbose $_fn_in $_fn_bkup
    fi
    cp --force --verbose $_fn_out $_fn_in
    else
    cat $_fn_out
    echo "
    You need to be root to actually overwrite $_fn_in
    "
    fi

    rm --force --verbose $TMP/${_app}* $_fn_out

    exit 0
    #*************** end fstab_changes ******************************

    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Wed Sep 11 13:53:54 2019
    On 11/9/19 8:54 pm, Bit Twister wrote:
    On Wed, 11 Sep 2019 15:04:12 +1000, faeychild wrote:
    On 11/9/19 11:42 am, faeychild wrote:

    /tmp and EFI are the partitions still not labeled.

    Should we continue?

    Why not, someone may come along and want a working copy. :)


    A phenomenal script, Bits




    tmp]$ ./fstab-label-1.sh #********************************************************************
    #* /etc/fstab
    #* Created by ./fstab-label-1.sh Wed 11 Sep 22:44 2019
    #*
    #********************************************************************
    LABEL=MG7 / ext4 noatime,acl 1 1
    /dev/nvme0n1p1 /boot/EFI vfat umask=000,iocharset=utf8 0 0
    none /proc proc defaults 0 0
    LABEL=tmp /tmp ext4 noatime,acl 1 2
    LABEL=swap swap swap defaults 0 0
    #****************** end /etc/fstab ******************

    You need to be root to actually overwrite /etc/fstab

    removed '/home/faeychild/tmp/fstab'





    cat /etc/fstab

    #/dev/nvme0n1p2 / ext4 noatime,acl 1 1
    LABEL=MG7 / ext4 noatime,acl 1 1
    /dev/nvme0n1p1 /boot/EFI vfat umask=000,iocharset=utf8 0 0
    none /proc proc defaults 0 0
    #/dev/nvme0n1p4 /tmp ext4 noatime,acl 1 2
    LABEL=tmp /tmp ext4 noatime,acl 1 2
    # Entry for /dev/sda1 :
    #UUID=ddce96e5-77d9-45dd-b1c7-4bf10d42fff7 /video ext4 noatime,acl 1 2\ LABEL=data /video ext4 noatime,acl 1 2
    #/dev/nvme0n1p3 swap swap defaults 0 0
    LABEL=swap swap swap defaults 0 0


    regards

    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Wed Sep 11 14:50:35 2019
    On Wed, 11 Sep 2019 22:53:54 +1000, faeychild wrote:
    On 11/9/19 8:54 pm, Bit Twister wrote:
    On Wed, 11 Sep 2019 15:04:12 +1000, faeychild wrote:
    On 11/9/19 11:42 am, faeychild wrote:

    /tmp and EFI are the partitions still not labeled.

    Should we continue?

    Why not, someone may come along and want a working copy. :)


    A phenomenal script, Bits

    It's not bad, but after finding your fstab bug I've improved
    it to catch an unknown device entry.
    - ---8<---8<---8<---8< cut below this line 8<---8<---8<---8<---8<
    #!/bin/bash
    #**************************************************************
    #*
    #* fstab_changes - change fstab to use labels Version 1.1
    #*
    #* creates a /etc/fstab_bkup if does not exists.
    #*
    #* Converts all entries to LABEL=xxx or PARTLABEL=xxx if partition
    #* has a volume/media label or a partition name.
    #*
    #* Any line starting with a # character is stripped from output.
    #*
    #* Assumptions:
    #* All volume/media labels, partition names, UUIDs are unique.
    #*
    #* This is free software released to public domain.
    #* Do with it whatever you want.
    #*
    #* If it breaks your system, you get to keep all broken pieces.
    #*
    #**************************************************************

    PATH=/usr/local/sbin:/sbin:/usr/sbin:/usr/bin:/bin

    _cmd_line_args="$*"
    _exe=$0
    _app=${0##*/}
    _user=$(id --user --name )
    TMP=$(getent passwd $_user | awk -F: '{print $(NF - 1)}')/tmp

    set -u # Show usage of unset variables as an error to help catch typos.

    _char1=""
    _created_by="Created by $_exe $(date '+%a %d %b %H:%M %Y')"
    _dev=""
    _fn_in=/etc/fstab
    _fn_bkup=${_fn_in}_bkup
    _fn_fault=$TMP/$_app.fault
    _fn_out=$TMP/fstab
    _fn_tmp=$TMP/$_app.tmp
    _label=""
    _line_in=""
    _line_out=""
    _mount_pt=""
    _rest_line=""
    _wd1=""

    function parse_command_line ()
    {
    set -- $_cmd_line_args
    if [ $# -ne 0 ] ; then
    head -21 $_exe
    exit 0
    fi
    } # end function parse_command_line

    function get_vol_name ()
    {
    _dev=$(findfs $_wd1 2> $_fn_tmp)
    if [ $? -ne 0 ] ; then
    echo "findfs $_wd1 FAILURE" >> $_fn_fault
    cat $_fn_tmp >> $_fn_fault
    rm --force $_fn_tmp
    _dev=$_wd1
    fi

    _label=$(blkid -o value -s LABEL $_dev)
    if [ -n "$_label" ] ; then
    _line_out="LABEL=$_label $_rest_line"
    else
    _label=$(blkid -o value -s PARTLABEL $_dev)
    if [ -n "$_label" ] ; then
    _line_out="PARTLABEL=$_label $_rest_line"
    fi
    fi

    } # end function get_vol_name

    function parse_line_in ()
    {
    _char1=""
    set -- $_line_in # parse line into $n arguments
    if [ $# -eq 0 ] ; then # empty line nothing to parse
    return
    fi

    _char1=${_line_in:0:1} # save first char of first word
    if [ $_char1 = '#' ] ; then # it is a comment pass it through
    return
    fi

    _wd1=$1 # save word 1 of line (IE. UUID=xxx)
    _mount_pt=$2 # save word 2 of line (mount point)

    shift # remove first word on line (xxxx=yyy)
    _rest_line="$*"
    get_vol_name

    } # end function parse_line_in

    #************************************
    #* main code start here
    #************************************

    parse_command_line
    mkdir --parents $TMP
    rm --force $_fn_fault $_fn_tmp

    echo "#********************************************************************" > $_fn_out
    echo "#* $_fn_in" >> $_fn_out
    echo "#* $_created_by" >> $_fn_out
    echo "#* " >> $_fn_out
    echo "#********************************************************************" >> $_fn_out

    while read _line_in ; do
    _line_out=$_line_in
    parse_line_in # parse line into _wd1 and _mount_pt
    if [ "$_char1" != "#" ] ; then
    echo $_line_out >> $_fn_out
    fi
    done < $_fn_in

    echo "#****************** end $_fn_in ******************" >> $_fn_out

    if [ -e $_fn_fault ] ; then
    echo -e "\n\t # $_fn_fault from $_exe" >> $_fn_fault
    cat $_fn_fault
    exit 1
    fi

    if [ $_user = "root" ] ; then
    if [ ! -e $_fn_bkup ] ; then # create a backup copy
    cp --verbose $_fn_in $_fn_bkup
    fi
    cp --force --verbose $_fn_out $_fn_in
    else
    cat $_fn_out
    echo "
    You need to be root to actually overwrite $_fn_in
    "
    fi

    rm --force --verbose $TMP/${_app}* $_fn_out

    exit 0
    #*************** end fstab_changes ******************************

    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Wed Sep 11 15:06:37 2019
    On Wed, 11 Sep 2019 08:50:35 -0500, Bit Twister wrote:
    On Wed, 11 Sep 2019 22:53:54 +1000, faeychild wrote:
    On 11/9/19 8:54 pm, Bit Twister wrote:


    A phenomenal script, Bits

    It's not bad, but after finding your fstab bug I've improved
    it to catch an unknown device entry.

    Please provide a copy of the following output.
    lsblk -io NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT,LABEL,PARTLABEL

    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Wed Sep 11 15:56:19 2019
    On Sat, 7 Sep 2019 08:19:51 +1000, faeychild wrote:

    Attempting to label EFI results in an endless run with gparted.
    You did reference this in an earlier post.

    I was worried that if it did have a label then do not change it.

    I just now tested gparted, and I had no problem with label or partition name. ├─sda9 362.2G part ext4 /vmguest vmguest vmguest
    ├─sda10 1M part bios_grub
    ├─sda11 43.2G part ext4 mga61 mga61
    └─sda12 382M part vfat efi efi

    No idea why it did not work for you.
    Then again I do not have / in my label/names. :)


    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Wed Sep 11 23:35:27 2019
    On 12/9/19 12:06 am, Bit Twister wrote:
    On Wed, 11 Sep 2019 08:50:35 -0500, Bit Twister wrote:
    On Wed, 11 Sep 2019 22:53:54 +1000, faeychild wrote:
    On 11/9/19 8:54 pm, Bit Twister wrote:


    A phenomenal script, Bits

    It's not bad, but after finding your fstab bug I've improved
    it to catch an unknown device entry.

    Please provide a copy of the following output.
    lsblk -io NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT,LABEL,PARTLABEL



    stream]$ ./fstab-label-2.sh #********************************************************************
    #* /etc/fstab
    #* Created by ./fstab-label-2.sh Thu 12 Sep 08:26 2019
    #*
    #********************************************************************
    LABEL=MG7 / ext4 noatime,acl 1 1
    /dev/nvme0n1p1 /boot/EFI vfat umask=000,iocharset=utf8 0 0
    none /proc proc defaults 0 0
    LABEL=tmp /tmp ext4 noatime,acl 1 2
    LABEL=swap swap swap defaults 0 0
    #****************** end /etc/fstab ******************

    You need to be root to actually overwrite /etc/fstab

    removed '/home/faeychild/tmp/fstab-label-2.sh.tmp'
    removed '/home/faeychild/tmp/fstab'







    ~]$ lsblk -io NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT,LABEL,PARTLABEL
    NAME SIZE TYPE FSTYPE MOUNTPOINT LABEL PARTLABEL sda 5.5T disk
    `-sda1 5.5T part ext4 /video data data
    sdb 29.7G disk
    `-sdb1 29.7G part vfat /run/media/faeychild/3238-3631
    sr0 1024M rom
    nvme0n1 119.2G disk
    |-nvme0n1p1 299M part vfat /boot/EFI EFI |-nvme0n1p2 22.3G part ext4 / MG7 MG7 |-nvme0n1p3 10.6G part swap [SWAP] swap swap |-nvme0n1p4 12.2G part ext4 /tmp tmp tmp |-nvme0n1p5 20.4G part ext4 MG7_bu MG7_bu `-nvme0n1p6 2G part ext4 boot boot



    regards

    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Thu Sep 12 00:32:39 2019
    On 12/9/19 8:35 am, faeychild wrote:


    I pointed your script at an untouched fstab


    cat /etc/fstab.old

    /dev/nvme0n1p2 / ext4 noatime,acl 1 1
    /dev/nvme0n1p1 /boot/EFI vfat umask=000,iocharset=utf8 0 0
    none /proc proc defaults 0 0
    /dev/nvme0n1p4 /tmp ext4 noatime,acl 1 2
    # Entry for /dev/sda1 :
    UUID=ddce96e5-77d9-45dd-b1c7-4bf10d42fff7 /video ext4 noatime,acl 1 2 /dev/nvme0n1p3 swap swap defaults 0 0



    result

    stream]$ ./fstab-label-2.sh #********************************************************************
    #* /etc/fstab.old
    #* Created by ./fstab-label-2.sh Thu 12 Sep 09:19 2019
    #*
    #******************************************************************** /dev/nvme0n1p2 / ext4 noatime,acl 1 1
    /dev/nvme0n1p1 /boot/EFI vfat umask=000,iocharset=utf8 0 0
    none /proc proc defaults 0 0
    /dev/nvme0n1p4 /tmp ext4 noatime,acl 1 2 UUID=ddce96e5-77d9-45dd-b1c7-4bf10d42fff7 /video ext4 noatime,acl 1 2 /dev/nvme0n1p3 swap swap defaults 0 0
    #****************** end /etc/fstab.old ******************





    regards
    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Thu Sep 12 01:38:33 2019
    On Thu, 12 Sep 2019 08:35:27 +1000, faeychild wrote:
    On 12/9/19 12:06 am, Bit Twister wrote:
    On Wed, 11 Sep 2019 08:50:35 -0500, Bit Twister wrote:
    On Wed, 11 Sep 2019 22:53:54 +1000, faeychild wrote:
    On 11/9/19 8:54 pm, Bit Twister wrote:


    A phenomenal script, Bits


    LABEL=MG7 / ext4 noatime,acl 1 1
    /dev/nvme0n1p1 /boot/EFI vfat umask=000,iocharset=utf8 0 0

    paste the following and show me the results

    _dev=/dev/nvme0n1p1
    blkid -o value -s LABEL $_dev ; echo rtn=$?
    blkid -o value -s PARTLABEL $_dev ; echo rtn=$?



    |-nvme0n1p1 299M part vfat /boot/EFI EFI

    Did you know, you can add noauto to fstab for any partitions you
    do not want mounted during boot. Example:
    /dev/nvme0n1p1 /boot/EFI vfat noauto,umask=000,iocharset=utf8 0 0

    if you add users, users can mount the partition.



    `-nvme0n1p6 2G part ext4 boot boot

    I suggest that should be something like boot_iso.
    As a rule, I never label/name a partition with something I do not want
    as a mount point.


    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Thu Sep 12 07:56:33 2019
    On 12/9/19 10:38 am, Bit Twister wrote:


    _dev=/dev/nvme0n1p1
    blkid -o value -s LABEL $_dev ; echo rtn=$?
    blkid -o value -s PARTLABEL $_dev ; echo rtn=$?



    [root@unimatrix ~]# _dev=/dev/nvme0n1p1
    [root@unimatrix ~]# blkid -o value -s LABEL $_dev ; echo rtn=$?
    rtn=0
    [root@unimatrix ~]# blkid -o value -s PARTLABEL $_dev ; echo rtn=$?
    EFI
    rtn=0



    |-nvme0n1p1 299M part vfat /boot/EFI EFI

    Did you know, you can add noauto to fstab for any partitions you
    do not want mounted during boot. Example:
    /dev/nvme0n1p1 /boot/EFI vfat noauto,umask=000,iocharset=utf8 0 0

    if you add users, users can mount the partition.


    Two more things that I know now, Bits Thanks :-)

    `-nvme0n1p6 2G part ext4 boot boot

    I suggest that should be something like boot_iso.
    As a rule, I never label/name a partition with something I do not want
    as a mount point.


    Identifies it better also.

    Thunderbird is indenting each entry and the page is running off the
    right hand side of the panel.
    I may have to start a new thread or find Thunderbird's switch.


    Regards
    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Thu Sep 12 09:18:25 2019
    On Thu, 12 Sep 2019 16:56:33 +1000, faeychild wrote:
    On 12/9/19 10:38 am, Bit Twister wrote:


    _dev=/dev/nvme0n1p1
    blkid -o value -s LABEL $_dev ; echo rtn=$?
    blkid -o value -s PARTLABEL $_dev ; echo rtn=$?



    [root@unimatrix ~]# _dev=/dev/nvme0n1p1
    [root@unimatrix ~]# blkid -o value -s LABEL $_dev ; echo rtn=$?
    rtn=0
    [root@unimatrix ~]# blkid -o value -s PARTLABEL $_dev ; echo rtn=$?
    EFI
    rtn=0

    Heheh, ah, Murphy is at it again. I expected you to run the commands as user. Do not need the return code so as a user, run

    _dev=/dev/nvme0n1p1
    blkid -o value -s LABEL $_dev
    blkid -o value -s PARTLABEL $_dev


    Thunderbird is indenting each entry and the page is running off the
    right hand side of the panel.
    I may have to start a new thread or find Thunderbird's switch.

    We are close to wrapping up labels anyway. So maybe something like
    Convert fstab to use partition names/labels
    with output from
    lsblk -io NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT,LABEL,PARTLABEL


    To make it easy on clean installs and backups, I suggest you make
    all your label/names the same as desired mount points.

    That way the fstab_changes script can automagically create the mount points
    for you.

    I suggest name/label should be video for /video partition,
    EFI for /boot/EFI, and a shorter value for
    sdb1 29.7G part vfat /run/media/faeychild/3238-3631




    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Thu Sep 12 11:12:20 2019
    On 12/9/19 6:18 pm, Bit Twister wrote:
    On Thu, 12 Sep 2019 16:56:33 +1000, faeychild wrote:
    On 12/9/19 10:38 am, Bit Twister wrote:


    _dev=/dev/nvme0n1p1
    blkid -o value -s LABEL $_dev ; echo rtn=$?
    blkid -o value -s PARTLABEL $_dev ; echo rtn=$?



    [root@unimatrix ~]# _dev=/dev/nvme0n1p1
    [root@unimatrix ~]# blkid -o value -s LABEL $_dev ; echo rtn=$?
    rtn=0
    [root@unimatrix ~]# blkid -o value -s PARTLABEL $_dev ; echo rtn=$?
    EFI
    rtn=0

    Heheh, ah, Murphy is at it again. I expected you to run the commands as
    user.
    Do not need the return code so as a user, run

    definitely my fault. I cut/pasted the command into the terminal --
    command not found
    Because I had a root terminal open I jumped on it without thinking

    I suppose I should put sbin is user path

    _dev=/dev/nvme0n1p1
    blkid -o value -s LABEL $_dev
    blkid -o value -s PARTLABEL $_dev



    [faeychild@unimatrix ~]$ _dev=/dev/nvme0n1p1
    [faeychild@unimatrix ~]$ /usr/sbin/blkid -o value -s LABEL $_dev [faeychild@unimatrix ~]$ /usr/sbin/blkid -o value -s PARTLABEL $_dev
    EFI
    [faeychild@unimatrix ~]$



    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Thu Sep 12 12:15:08 2019
    On Thu, 12 Sep 2019 20:12:20 +1000, faeychild wrote:
    On 12/9/19 6:18 pm, Bit Twister wrote:

    I suppose I should put sbin is user path

    Yeah, I put a .sh file in /etc/profile.d to add the sbin and other
    locations to PATH for all users.


    _dev=/dev/nvme0n1p1
    blkid -o value -s LABEL $_dev
    blkid -o value -s PARTLABEL $_dev



    [faeychild@unimatrix ~]$ _dev=/dev/nvme0n1p1
    [faeychild@unimatrix ~]$ /usr/sbin/blkid -o value -s LABEL $_dev [faeychild@unimatrix ~]$ /usr/sbin/blkid -o value -s PARTLABEL $_dev
    EFI

    Well I am stumped. commands were cut from the fstab_changes script and
    they work from user terminal which means script should work.

    Save this script, change _fn_in=/etc/fstab_new
    then run it as root.
    ----8<----8<----8<----8<---cut below this line----8<----8<-8<
    #!/bin/bash
    #**************************************************************
    #*
    #* fstab_changes - change fstab to use labels Version 1.2
    #*
    #* creates a /etc/fstab_bkup if does not exists.
    #*
    #* Converts all entries to LABEL=xxx or PARTLABEL=xxx if partition
    #* has a volume/media label or a partition name.
    #*
    #* Any line starting with a # character is stripped from output.
    #*
    #* Assumptions:
    #* All volume/media labels, partition names, UUIDs are unique.
    #*
    #* This is free software released to public domain.
    #* Do with it whatever you want.
    #*
    #* If it breaks your system, you get to keep all broken pieces.
    #*
    #**************************************************************

    PATH=/usr/local/sbin:/sbin:/usr/sbin:/usr/bin:/bin

    _cmd_line_args="$*"
    _exe=$0
    _app=${0##*/}
    _user=$(id --user --name )
    TMP=$(getent passwd $_user | awk -F: '{print $(NF - 1)}')/tmp

    set -u # Show usage of unset variables as an error to help catch typos.

    _char1=""
    _created_by="Created by $_exe $(date '+%a %d %b %H:%M %Y')"
    _dev=""
    _fn_in=/etc/fstab
    _fn_bkup=${_fn_in}_bkup
    _fn_fault=$TMP/$_app.fault
    _fn_out=$TMP/fstab
    _fn_tmp=$TMP/$_app.tmp
    _label=""
    _line_in=""
    _line_out=""
    _mount_pt=""
    _rest_line=""
    _wd1=""

    function parse_command_line ()
    {
    set -- $_cmd_line_args
    if [ $# -ne 0 ] ; then
    head -21 $_exe
    exit 0
    fi
    } # end function parse_command_line

    function get_vol_name ()
    {
    #*****************************
    #* verify device id is valid
    #*****************************

    _dev=$(findfs $_wd1 2> $_fn_tmp)
    if [ $? -ne 0 ] ; then
    echo "findfs $_wd1 FAILURE" >> $_fn_fault
    cat $_fn_tmp >> $_fn_fault
    rm --force $_fn_tmp
    _dev=$_wd1
    fi

    #******************************************
    #* check for volume/media/label and
    #* if does not exist try partition name
    #******************************************

    _label=$(blkid -o value -s LABEL $_dev)
    if [ -n "$_label" ] ; then
    _line_out="LABEL=$_label $_rest_line"
    else
    _label=$(blkid -o value -s PARTLABEL $_dev)
    if [ -n "$_label" ] ; then
    _line_out="PARTLABEL=$_label $_rest_line"
    fi
    fi

    #***************************************************
    #* use the partition name for swap just in case
    #* swap is formatted during clean install or
    #* another OS is installed using the same partition
    #***************************************************

    if [ $_mount_pt = "swap" ] ; then
    _label=$(blkid -o value -s PARTLABEL $_dev)
    if [ -n "$_label" ] ; then
    _line_out="PARTLABEL=$_label $_rest_line"
    fi
    fi

    } # end function get_vol_name

    function parse_line_in ()
    {
    _char1=""
    set -- $_line_in # parse line into $n arguments
    if [ $# -eq 0 ] ; then # empty line nothing to parse
    return
    fi

    _char1=${_line_in:0:1} # save first char of first word
    if [ $_char1 = '#' ] ; then # it is a comment pass it through
    return
    fi

    _wd1=$1 # save word 1 of line (IE. UUID=xxx)
    _mount_pt=$2 # save word 2 of line (mount point)

    shift # remove first word on line (xxxx=yyy)
    _rest_line="$*"
    get_vol_name

    } # end function parse_line_in

    #************************************
    #* main code start here
    #************************************

    parse_command_line
    mkdir --parents $TMP
    rm --force $_fn_fault $_fn_tmp

    echo "#********************************************************************" > $_fn_out
    echo "#* $_fn_in" >> $_fn_out
    echo "#* $_created_by" >> $_fn_out
    echo "#* " >> $_fn_out
    echo "#********************************************************************" >> $_fn_out

    while read _line_in ; do
    _line_out=$_line_in # just in case nothing was changed
    parse_line_in # parse line into char1, _wd1, _mount_pt
    if [ "$_char1" != "#" ] ; then
    echo $_line_out >> $_fn_out
    fi
    done < $_fn_in

    echo "#****************** end $_fn_in ******************" >> $_fn_out

    if [ -e $_fn_fault ] ; then # there were problems
    echo -e "\n\t # $_fn_fault from $_exe" >> $_fn_fault
    cat $_fn_fault
    exit 1
    fi

    if [ $_user = "root" ] ; then
    if [ ! -e $_fn_bkup ] ; then # create a backup copy
    cp --verbose $_fn_in $_fn_bkup
    fi
    cp --force --verbose $_fn_out $_fn_in
    ls -al $_fn_in*
    else
    cat $_fn_out
    echo "
    You need to be root to actually overwrite $_fn_in
    "
    fi

    rm --force --verbose $TMP/${_app}* $_fn_out

    exit 0
    #*************** end fstab_changes ******************************

    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Thu Sep 12 12:18:18 2019
    On Thu, 12 Sep 2019 06:15:08 -0500, Bit Twister wrote:
    On Thu, 12 Sep 2019 20:12:20 +1000, faeychild wrote:
    On 12/9/19 6:18 pm, Bit Twister wrote:

    I suppose I should put sbin is user path

    Yeah, I put a .sh file in /etc/profile.d to add the sbin and other
    locations to PATH for all users.


    _dev=/dev/nvme0n1p1
    blkid -o value -s LABEL $_dev
    blkid -o value -s PARTLABEL $_dev



    [faeychild@unimatrix ~]$ _dev=/dev/nvme0n1p1
    [faeychild@unimatrix ~]$ /usr/sbin/blkid -o value -s LABEL $_dev
    [faeychild@unimatrix ~]$ /usr/sbin/blkid -o value -s PARTLABEL $_dev
    EFI

    Well I am stumped. commands were cut from the fstab_changes script and
    they work from user terminal which means script should work.

    Save this script, change _fn_in=/etc/fstab_new
    then run it as root.

    Forgot to say cp /etc/fstab /etc/fstab_new before running script.

    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Thu Sep 12 13:48:56 2019
    On 12/9/19 9:18 pm, Bit Twister wrote:

    _dev=/dev/nvme0n1p1
    blkid -o value -s LABEL $_dev
    blkid -o value -s PARTLABEL $_dev



    [faeychild@unimatrix ~]$ _dev=/dev/nvme0n1p1
    [faeychild@unimatrix ~]$ /usr/sbin/blkid -o value -s LABEL $_dev
    [faeychild@unimatrix ~]$ /usr/sbin/blkid -o value -s PARTLABEL $_dev
    EFI

    Well I am stumped.


    No!! It's something missed.


    How is that for yet another historically brilliant understatement.

    Not to worry. It will come to you - an epiphany

    Standing by.... :-)




    Save this script, change _fn_in=/etc/fstab_new
    then run it as root.


    Tomorrow!! It's 22:30 here. Approaching the bad hours to do anything adventurous

    Forgot to say cp /etc/fstab /etc/fstab_new before running script.

    Yea!! smart move! work on the backup.



    I wish you a good day, Bits

    Regards

    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From David W. Hodgins@2:250/1 to All on Thu Sep 12 16:35:13 2019
    On Thu, 12 Sep 2019 04:18:25 -0400, Bit Twister <BitTwister@mouse-potato.com> wrote:

    Heheh, ah, Murphy is at it again. I expected you to run the commands as
    user.
    Do not need the return code so as a user, run
    _dev=/dev/nvme0n1p1
    blkid -o value -s LABEL $_dev
    blkid -o value -s PARTLABEL $_dev

    Just a reminder. From man cache ...
    Note that blkid reads information directly from devices and for non-root users it returns cached unverified information.

    Running it as root will have updated the info in the cache, which may have changed what the user sees when they run it.

    Regards, Dave Hodgins

    --
    Change dwhodgins@nomail.afraid.org to davidwhodgins@teksavvy.com for
    email replies.

    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Thu Sep 12 20:01:00 2019
    On Thu, 12 Sep 2019 11:35:13 -0400, David W. Hodgins wrote:
    On Thu, 12 Sep 2019 04:18:25 -0400, Bit Twister
    <BitTwister@mouse-potato.com> wrote:

    _dev=/dev/nvme0n1p1
    blkid -o value -s LABEL $_dev
    blkid -o value -s PARTLABEL $_dev

    Just a reminder. From man cache ...
    Note that blkid reads information directly from devices and for non-root users it returns cached unverified information.

    I hear what you are saying, but nvme0n1p1 is mounted, console commands,
    pulled from script, returned correct value when executed as user. :(

    I went ahead and modified script to require root to enter yes to install changes.
    ----8<----8<----8<----8<-- cut below this line --8<----8<
    #!/bin/bash
    #**************************************************************
    #*
    #* fstab_changes - change fstab to use labels Version 1.3
    #*
    #* creates a /etc/fstab_bkup if does not exists.
    #*
    #* Converts all entries to LABEL=xxx or PARTLABEL=xxx if partition
    #* has a volume/media label or a partition name.
    #*
    #* Any line starting with a # character is stripped from output.
    #*
    #* If executed by root, you will be prompted to enter yes to
    #* install changes. Read protected partitions may not be shown
    #* correctly if executed by user and no changes can be made.
    #*
    #* Assumptions:
    #* All volume/media labels, partition names, UUIDs are unique.
    #*
    #* This is free software released to public domain.
    #* Do with it whatever you want.
    #*
    #* If it breaks your system, you get to keep all broken pieces.
    #*
    #**************************************************************

    PATH=/usr/local/sbin:/sbin:/usr/sbin:/usr/bin:/bin

    _cmd_line_args="$*"
    _exe=$0
    _app=${0##*/}
    _user=$(id --user --name )
    TMP=$(getent passwd $_user | awk -F: '{print $(NF - 1)}')/tmp

    set -u # Show usage of unset variables as an error to help catch typos.

    _char1=""
    _created_by="Created by $_exe $(date '+%a %d %b %H:%M %Y')"
    _dev=""
    _fn_in=/etc/fstab
    _fn_bkup=${_fn_in}_bkup
    _fn_fault=$TMP/$_app.fault
    _fn_out=$TMP/fstab
    _fn_tmp=$TMP/$_app.tmp
    _label=""
    _line_in=""
    _line_out=""
    _mount_pt=""
    _rest_line=""
    _wd1=""

    function parse_command_line ()
    {
    set -- $_cmd_line_args
    if [ $# -ne 0 ] ; then
    head -25 $_exe
    exit 0
    fi
    } # end function parse_command_line

    function get_vol_name ()
    {
    #*****************************
    #* verify device id is valid
    #*****************************

    _dev=$(findfs $_wd1 2> $_fn_tmp)
    if [ $? -ne 0 ] ; then
    echo "findfs $_wd1 FAILURE" >> $_fn_fault
    cat $_fn_tmp >> $_fn_fault
    rm --force $_fn_tmp
    _dev=$_wd1
    fi

    #******************************************
    #* check for volume/media/label and
    #* if does not exist try partition name
    #******************************************

    _label=$(blkid -o value -s LABEL $_dev)
    if [ -n "$_label" ] ; then
    _line_out="LABEL=$_label $_rest_line"
    else
    _label=$(blkid -o value -s PARTLABEL $_dev)
    if [ -n "$_label" ] ; then
    _line_out="PARTLABEL=$_label $_rest_line"
    fi
    fi

    #***************************************************
    #* use the partition name for swap just in case
    #* swap is formatted during clean install or
    #* another OS is installed using the same partition
    #***************************************************

    if [ "$_mount_pt" = "swap" ] ; then
    _label=$(blkid -o value -s PARTLABEL $_dev)
    if [ -n "$_label" ] ; then
    _line_out="PARTLABEL=$_label $_rest_line"
    fi
    fi

    } # end function get_vol_name

    function parse_line_in ()
    {
    _char1=""
    set -- $_line_in # parse line into $n arguments
    if [ $# -eq 0 ] ; then # empty line nothing to parse
    return
    fi

    _char1=${_line_in:0:1} # save first char of first word
    if [ "$_char1" = '#' ] ; then # it is a comment pass it through
    return
    fi

    _wd1=$1 # save word 1 of line (IE. UUID=xxx)
    _mount_pt=$2 # save word 2 of line (mount point)

    shift # remove first word on line (xxxx=yyy)
    _rest_line="$*"
    get_vol_name

    } # end function parse_line_in

    #************************************
    #* main code start here
    #************************************

    parse_command_line
    mkdir --parents $TMP
    rm --force $_fn_fault $_fn_tmp

    echo "#********************************************************************" > $_fn_out
    echo "#* $_fn_in" >> $_fn_out
    echo "#* $_created_by" >> $_fn_out
    echo "#* " >> $_fn_out
    echo "#********************************************************************" >> $_fn_out

    while read _line_in ; do
    _line_out=$_line_in # just in case nothing was changed
    parse_line_in # parse line into char1, _wd1, _mount_pt
    if [ "$_char1" != "#" ] ; then
    echo $_line_out >> $_fn_out
    fi
    done < $_fn_in

    echo "#****************** end $_fn_in ******************" >> $_fn_out

    if [ -e $_fn_fault ] ; then # there were problems
    echo -e "\n\t # $_fn_fault from $_exe" >> $_fn_fault
    cat $_fn_fault
    exit 1
    fi

    if [ "$_user" = "root" ] ; then
    cat $_fn_out
    if [ ! -e $_fn_bkup ] ; then # create a backup copy
    cp --verbose $_fn_in $_fn_bkup
    fi

    ls -al $_fn_in*

    echo -en "\n\tInstall changed $_fn_out: yes or [no] "
    read _wd1
    if [ "$_wd1" = "yes" ] ; then
    cp --force --verbose $_fn_out $_fn_in
    ls -al $_fn_in*
    else
    echo -e "\n\t Skipped installing $_fn_out changes\n"
    fi
    else
    cat $_fn_out
    echo -e "\n\t You need to be root to actually overwrite $_fn_in\n"
    fi

    rm --force --verbose $TMP/${_app}* $_fn_out

    exit 0
    #*************** end fstab_changes ******************************

    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Fri Sep 13 06:46:42 2019
    On 12/9/19 9:15 pm, Bit Twister wrote:

    Well I am stumped. commands were cut from the fstab_changes script and
    they work from user terminal which means script should work.

    Save this script, change _fn_in=/etc/fstab_new
    then run it as root.
    ----8<----8<----8<----8<---cut below this line----8<----8<-8<
    #!/bin/bash
    #**************************************************************
    #*
    #* fstab_changes - change fstab to use labels Version 1.2

    #*************** end fstab_changes ******************************


    [root@unimatrix ~]# cp /etc/fstab /etc/fstab_new
    [root@unimatrix ~]# cd /video/stream
    [root@unimatrix stream]# ./fstab_new
    -bash: ./fstab_new: No such file or directory
    [root@unimatrix stream]# ./fstab_new.sh
    -bash: ./fstab_new.sh: Permission denied
    [root@unimatrix stream]# chown root:root fstab_new.sh
    [root@unimatrix stream]# ls -l fstab.sh
    ls: cannot access 'fstab.sh': No such file or directory
    [root@unimatrix stream]# ls -l fstab_new.sh
    -rwxrwxr-x 1 root root 4970 Sep 13 15:33 fstab_new.sh*
    [root@unimatrix stream]# ./fstab_new.sh
    '/etc/fstab_new' -> '/etc/fstab_new_bkup'
    '/root/tmp/fstab' -> '/etc/fstab_new'
    -rw-r--r-- 1 root root 465 Sep 13 15:37 /etc/fstab_new
    -rw-r--r-- 1 root root 446 Sep 13 15:37 /etc/fstab_new_bkup
    removed '/root/tmp/fstab_new.sh.tmp'
    removed '/root/tmp/fstab'



    I've had an afternoon of being a bit "slow-witted", Bits


    [root@unimatrix stream]# cat /etc/fstab_new #********************************************************************
    #* /etc/fstab_new
    #* Created by ./fstab_new.sh Fri 13 Sep 15:37 2019
    #*
    #********************************************************************
    LABEL=MG7 / ext4 noatime,acl 1 1
    PARTLABEL=EFI /boot/EFI vfat umask=000,iocharset=utf8 0 0
    none /proc proc defaults 0 0
    LABEL=tmp /tmp ext4 noatime,acl 1 2
    PARTLABEL=swap swap swap defaults 0 0
    #****************** end /etc/fstab_new ******************


    Some changes,Bits.. It looks neater than my mess.


    [root@unimatrix stream]# cat /etc/fstab
    #/dev/nvme0n1p2 / ext4 noatime,acl 1 1
    LABEL=MG7 / ext4 noatime,acl 1 1
    /dev/nvme0n1p1 /boot/EFI vfat umask=000,iocharset=utf8 0 0
    none /proc proc defaults 0 0
    #/dev/nvme0n1p4 /tmp ext4 noatime,acl 1 2
    LABEL=tmp /tmp ext4 noatime,acl 1 2
    # Entry for /dev/sda1 :
    #UUID=ddce96e5-77d9-45dd-b1c7-4bf10d42fff7 /video ext4 noatime,acl 1 2\ LABEL=data /video ext4 noatime,acl 1 2
    #/dev/nvme0n1p3 swap swap defaults 0 0
    LABEL=swap swap swap defaults 0 0



    Regards

    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Fri Sep 13 12:42:23 2019
    On Fri, 13 Sep 2019 15:46:42 +1000, faeychild wrote:
    On 12/9/19 9:15 pm, Bit Twister wrote:


    [root@unimatrix stream]# cat /etc/fstab_new #********************************************************************
    #* /etc/fstab_new
    #* Created by ./fstab_new.sh Fri 13 Sep 15:37 2019
    #*
    #******************************************************************** LABEL=MG7 / ext4 noatime,acl 1 1
    PARTLABEL=EFI /boot/EFI vfat umask=000,iocharset=utf8 0 0
    none /proc proc defaults 0 0
    LABEL=tmp /tmp ext4 noatime,acl 1 2
    PARTLABEL=swap swap swap defaults 0 0
    #****************** end /etc/fstab_new ******************


    Some changes,Bits.. It looks neater than my mess.

    You need to verify that all old fstab entries are in new fstab file.
    For some reason your LABEL=data /video partition is not in new fstab. :-(
    Going to guess it is because of the backslash (\) on end of line 8

    Which brings up a point. I highly recommend setting partition name
    and label the same as the mount point. Otherwise any automation scripts
    will have to manage those aberrations.

    I suggest changing /video partition name and label to video, not data.

    For the EFI partition:
    o umount /boot/EFI
    o mv /boot/EFI /EFI
    o run gparted and set the partition label to EFI
    o edit /etc/fstab change /boot/EFI to /EFI and add "users,noauto,"

    Suggested EFI fstab entry
    old /dev/nvme0n1p1 /boot/EFI vfat umask=000,iocharset=utf8 0 0
    new /dev/nvme0n1p1 /EFI vfat users,noauto,umask=000,iocharset=utf8 0 0

    Then test with
    mount /EFI ; ls /EFI

    I see you like uppercase. I prefer lowercase. Less work at the
    keyboard and much easier to not have to remember when to up/lowercase
    the partition name.

    I see you are running with an old copy of the script.
    Please use this copy.

    ----8<----8<----8<----8<--cut below this line --8<----8<----8<
    #!/bin/bash
    #**************************************************************
    #*
    #* fstab_changes - change fstab to use labels Version 1.4
    #*
    #* creates a /etc/fstab_bkup if does not exists.
    #*
    #* Converts all entries to LABEL=xxx or PARTLABEL=xxx if partition
    #* has a volume/media label or a partition name.
    #*
    #* Any line starting with a # character is stripped from output.
    #*
    #* If executed by root, you will be prompted to enter yes to
    #* install changes. Read protected partitions may not be shown
    #* correctly if executed by user and no changes can be made.
    #*
    #* Assumptions:
    #* All volume/media labels, partition names, UUIDs are unique.
    #*
    #* This is free software released to public domain.
    #* Do with it whatever you want.
    #*
    #* If it breaks your system, you get to keep all broken pieces.
    #*
    #**************************************************************

    PATH=/usr/local/sbin:/sbin:/usr/sbin:/usr/bin:/bin

    _cmd_line_args="$*"
    _exe=$0
    _app=${0##*/}
    _user=$(id --user --name )
    TMP=$(getent passwd $_user | awk -F: '{print $(NF - 1)}')/tmp

    set -u # Show usage of unset variables as an error to help catch typos.

    _char1=""
    _created_by="Created by $_exe $(date '+%a %d %b %H:%M %Y')"
    _dev=""
    _fn_in=/etc/fstab
    _fn_bkup=${_fn_in}_bkup
    _fn_fault=$TMP/$_app.fault
    _fn_out=$TMP/fstab
    _fn_tmp=$TMP/$_app.tmp
    _fs_spec=""
    _label=""
    _line_in=""
    _line_out=""
    _mount_pt=""
    _rest_line=""
    _version="1.4"

    function parse_command_line ()
    {
    set -- $_cmd_line_args
    if [ $# -ne 0 ] ; then
    head -25 $_exe
    exit 0
    fi
    } # end function parse_command_line

    function get_vol_name ()
    {
    #*****************************
    #* verify device id is valid
    #*****************************

    _dev=$(findfs $_fs_spec 2> $_fn_tmp)
    if [ $? -ne 0 ] ; then
    echo "findfs $_fs_spec FAILURE" >> $_fn_fault
    cat $_fn_tmp >> $_fn_fault
    rm --force $_fn_tmp
    _dev=$_fs_spec
    fi

    #******************************************
    #* check for volume/media/label and
    #* if does not exist try partition name
    #******************************************

    _label=$(blkid -o value -s LABEL $_dev)
    if [ -n "$_label" ] ; then
    _line_out="LABEL=$_label $_rest_line"
    else
    _label=$(blkid -o value -s PARTLABEL $_dev)
    if [ -n "$_label" ] ; then
    _line_out="PARTLABEL=$_label $_rest_line"
    fi
    fi

    #***************************************************
    #* use the partition name for swap just in case
    #* swap is formatted during clean install or
    #* another OS is installed using the same partition
    #***************************************************

    if [ "$_mount_pt" = "swap" ] ; then
    _label=$(blkid -o value -s PARTLABEL $_dev)
    if [ -n "$_label" ] ; then
    _line_out="PARTLABEL=$_label $_rest_line"
    fi
    fi

    } # end function get_vol_name

    function parse_line_in ()
    {
    _char1=""
    set -- $_line_in # parse line into $n arguments
    if [ $# -eq 0 ] ; then # empty line nothing to parse
    return
    fi

    _char1=${_line_in:0:1} # save first char of first word
    if [ "$_char1" = '#' ] ; then # it is a comment pass it through
    return
    fi

    _fs_spec=$1 # save word 1 of line (IE. UUID=xxx)
    _mount_pt=$2 # save word 2 of line (mount point)

    shift # remove first word on line (xxxx=yyy)
    _rest_line="$*"
    get_vol_name

    } # end function parse_line_in

    #************************************
    #* main code start here
    #************************************

    parse_command_line
    mkdir --parents $TMP
    rm --force $_fn_fault $_fn_tmp

    echo "#********************************************************************" > $_fn_out
    echo "#* " >> $_fn_out
    echo "#* $_fn_in Version $_version" >> $_fn_out
    echo "#* $_created_by" >> $_fn_out
    echo "#* " >> $_fn_out
    echo "#********************************************************************" >> $_fn_out
    echo " " >> $_fn_out

    while read _line_in ; do
    _line_out=$_line_in # just in case nothing was changed
    parse_line_in # parse line into _char1, _fs_spec, _mount_pt
    if [ "$_char1" != "#" ] ; then
    echo $_line_out >> $_fn_out
    fi
    done < $_fn_in

    echo "#****************** end $_fn_in ******************" >> $_fn_out

    if [ -e $_fn_fault ] ; then # there were problems
    echo -e "\n\t # $_fn_fault from $_exe" >> $_fn_fault
    cat $_fn_fault
    exit 1
    fi

    if [ "$_user" = "root" ] ; then
    cat $_fn_out
    if [ ! -e $_fn_bkup ] ; then # create a backup copy
    cp --verbose $_fn_in $_fn_bkup
    fi

    echo -e "\nls -al $_fn_in*"
    ls -al $_fn_in*

    echo -en "\n\t Install changed $_fn_out: yes or [no] "
    read _label
    if [ "$_label" = "yes" ] ; then
    cp --force --verbose $_fn_out $_fn_in
    ls -al $_fn_in*
    else
    echo -e "\n\t Skipped installing $_fn_out changes\n"
    fi
    else
    cat $_fn_out
    echo -e "\n\t You need to be root to actually overwrite $_fn_in\n"
    fi

    rm --force --verbose $TMP/${_app}* $_fn_out

    exit 0
    #*************** end fstab_changes ******************************

    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Sat Sep 14 00:19:19 2019
    On 13/9/19 9:42 pm, Bit Twister wrote:
    On Fri, 13 Sep 2019 15:46:42 +1000, faeychild wrote:
    On 12/9/19 9:15 pm, Bit Twister wrote:


    [root@unimatrix stream]# cat /etc/fstab_new
    #********************************************************************
    #* /etc/fstab_new
    #* Created by ./fstab_new.sh Fri 13 Sep 15:37 2019
    #*
    #********************************************************************
    LABEL=MG7 / ext4 noatime,acl 1 1
    PARTLABEL=EFI /boot/EFI vfat umask=000,iocharset=utf8 0 0
    none /proc proc defaults 0 0
    LABEL=tmp /tmp ext4 noatime,acl 1 2
    PARTLABEL=swap swap swap defaults 0 0
    #****************** end /etc/fstab_new ******************


    Some changes,Bits.. It looks neater than my mess.

    You need to verify that all old fstab entries are in new fstab file.
    For some reason your LABEL=data /video partition is not in new fstab. :-( Going to guess it is because of the backslash (\) on end of line 8



    A bit of confusion,Bits

    Should I be running your script on the original fstab with the
    /dev/***** entries

    My current fstab is a mishmash

    cat /etc/fstab

    #/dev/nvme0n1p2 / ext4 noatime,acl 1 1
    LABEL=MG7 / ext4 noatime,acl 1 1
    /dev/nvme0n1p1 /boot/EFI vfat umask=000,iocharset=utf8 0 0
    none /proc proc defaults 0 0
    #/dev/nvme0n1p4 /tmp ext4 noatime,acl 1 2
    LABEL=tmp /tmp ext4 noatime,acl 1 2
    # Entry for /dev/sda1 :
    LABEL=data /video ext4 noatime,acl 1 2
    #/dev/nvme0n1p3 swap swap defaults 0 0
    LABEL=swap swap swap defaults 0 0


    I have removed the line 8 with the trailing slash.

    My morning will hopelessly interrupted so nothing will



    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Sat Sep 14 00:20:37 2019
    On 14/9/19 9:19 am, faeychild wrote:
    On 13/9/19 9:42 pm, Bit Twister wrote:
    On Fri, 13 Sep 2019 15:46:42 +1000, faeychild wrote:
    On 12/9/19 9:15 pm, Bit Twister wrote:


    [root@unimatrix stream]# cat  /etc/fstab_new
    #********************************************************************
    #* /etc/fstab_new
    #* Created by ./fstab_new.sh Fri 13 Sep 15:37 2019
    #*
    #********************************************************************
    LABEL=MG7 / ext4 noatime,acl 1 1
    PARTLABEL=EFI /boot/EFI vfat umask=000,iocharset=utf8 0 0
    none /proc proc defaults 0 0
    LABEL=tmp /tmp ext4 noatime,acl 1 2
    PARTLABEL=swap swap swap defaults 0 0
    #****************** end /etc/fstab_new ******************


    Some changes,Bits.. It looks neater than my mess.

    You need to verify that all old fstab entries are in new fstab file.
    For some reason your LABEL=data /video partition is not in new fstab. :-(
    Going to guess it is because of the backslash (\) on end of line 8



     A bit of confusion,Bits

    Should I be running your script on the original fstab with the
    /dev/***** entries

    My current fstab is a mishmash

    cat /etc/fstab

    #/dev/nvme0n1p2 / ext4 noatime,acl 1 1
    LABEL=MG7 / ext4 noatime,acl 1 1
    /dev/nvme0n1p1 /boot/EFI vfat umask=000,iocharset=utf8 0 0
    none /proc proc defaults 0 0
    #/dev/nvme0n1p4 /tmp ext4 noatime,acl 1 2
    LABEL=tmp /tmp ext4 noatime,acl 1 2
    # Entry for /dev/sda1 :
    LABEL=data /video ext4 noatime,acl 1 2
    #/dev/nvme0n1p3 swap swap defaults 0 0
    LABEL=swap swap swap defaults 0 0


    I have removed the line 8 with the trailing slash.

    My morning will hopelessly interrupted so nothing will



    SENT IN ERROR UNFINISHED

    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.10-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Sat Sep 14 09:36:40 2019
    On Sat, 14 Sep 2019 09:19:19 +1000, faeychild wrote:
    On 13/9/19 9:42 pm, Bit Twister wrote:

    You need to verify that all old fstab entries are in new fstab file.
    For some reason your LABEL=data /video partition is not in new fstab. :-(
    Going to guess it is because of the backslash (\) on end of line 8



    A bit of confusion,Bits

    Should I be running your script on the original fstab with the
    /dev/***** entries

    Latest 1.4 version script does not care. You can test with whatever fstab you like. Latest release requires root to answer "yes" to overwrite fstab.

    What I am telling you is "you" have the verify that the new fstab has
    the same partitions as the fstab under test.




    My current fstab is a mishmash

    cat /etc/fstab

    #/dev/nvme0n1p2 / ext4 noatime,acl 1 1
    LABEL=MG7 / ext4 noatime,acl 1 1
    /dev/nvme0n1p1 /boot/EFI vfat umask=000,iocharset=utf8 0 0
    none /proc proc defaults 0 0
    #/dev/nvme0n1p4 /tmp ext4 noatime,acl 1 2
    LABEL=tmp /tmp ext4 noatime,acl 1 2
    # Entry for /dev/sda1 :
    LABEL=data /video ext4 noatime,acl 1 2
    #/dev/nvme0n1p3 swap swap defaults 0 0
    LABEL=swap swap swap defaults 0 0


    I have removed the line 8 with the trailing slash.

    My morning will hopelessly interrupted so nothing will

    That is ok by me. :)
    You do not seem to be reading all unread replies before proceeding
    with this thread on any given day. You should be running with script
    version 1.4, and I have made other suggestions about your labels and
    mount arguments you should make to /etc/fstab.

    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Sun Sep 15 00:03:31 2019
    On 14/9/19 6:36 pm, Bit Twister wrote:



    current fstab

    cat /etc/fstab

    #/dev/nvme0n1p2 / ext4 noatime,acl 1 1
    LABEL=mageia / ext4 noatime,acl 1 1
    /dev/nvme0n1p1 /efi vfat users,noauto,umask=000,iocharset=utf8 0 0
    none /proc proc defaults 0 0
    #/dev/nvme0n1p4 /tmp ext4 noatime,acl 1 2
    LABEL=tmp /tmp ext4 noatime,acl 1 2
    # Entry for /dev/sda1 :
    LABEL=video /video ext4 noatime,acl 1 2
    #/dev/nvme0n1p3 swap swap defaults 0 0
    LABEL=swap swap swap defaults 0 0



    result from script


    ../fstab-label-3.sh #********************************************************************
    #*
    #* /etc/fstab Version 1.4
    #* Created by ./fstab-label-3.sh Sun 15 Sep 08:48 2019
    #*
    #********************************************************************

    LABEL=mageia / ext4 noatime,acl 1 1
    /dev/nvme0n1p1 /efi vfat users,noauto,umask=000,iocharset=utf8 0 0
    none /proc proc defaults 0 0
    LABEL=tmp /tmp ext4 noatime,acl 1 2
    LABEL=video /video ext4 noatime,acl 1 2
    LABEL=swap swap swap defaults 0 0
    #****************** end /etc/fstab ******************

    You need to be root to actually overwrite /etc/fstab

    removed '/home/faeychild/tmp/fstab-label-3.sh.tmp'
    removed '/home/faeychild/tmp/fstab'




    lsblk -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT,PARTLABEL | sort -V
    NAME SIZE FSTYPE LABEL MOUNTPOINT PARTLABEL
    nvme0n1 119.2G
    sda 5.5T
    sdb 29.7G
    sr0 1024M
    └─nvme0n1p6 2G ext4 boot boot
    └─sda1 5.5T ext4 video /video video
    └─sdb1 29.7G vfat
    ├─nvme0n1p1 299M vfat efi
    ├─nvme0n1p2 22.3G ext4 mageia / mageia
    ├─nvme0n1p3 10.6G swap swap [SWAP] swap
    ├─nvme0n1p4 12.2G ext4 tmp /tmp tmp
    ├─nvme0n1p5 20.4G ext4 mageia_bu mageia_bu





    I spent some time this morning - early and uninterrupted - trying
    different labels for the rescue partition.

    It was interesting.

    Editing both "grub.cfg" and the partition labels.

    "boot" works, but "boot_iso and boot-iso and bootiso and sysrescue" don't.


    They cause the process to hang and time out on the "/device/by-label" line.

    So I'm currently back with "boot" until more free time becomes available


    Regards

    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.13-desktop-2.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Sun Sep 15 05:02:36 2019
    On Sun, 15 Sep 2019 09:03:31 +1000, faeychild wrote:
    On 14/9/19 6:36 pm, Bit Twister wrote:



    current fstab

    cat /etc/fstab

    #/dev/nvme0n1p2 / ext4 noatime,acl 1 1
    LABEL=mageia / ext4 noatime,acl 1 1

    Hmmm, when you are ready to start backing up into mageia_bu
    start a new thread. Suggest How do I create a hot backup?.
    I know I would not have the backup on the same device as source.
    If device fails, you lose both :-(

    $ lsblk -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT,PARTLABEL | grep cauldron ├─sda4 40.5G ext4 cauldron cauldron
    ├─sdb4 40G ext4 cauldron_bkup cauldron_bkup


    /dev/nvme0n1p1 /efi vfat users,noauto,umask=000,iocharset=utf8 0 0
    none /proc proc defaults 0 0
    #/dev/nvme0n1p4 /tmp ext4 noatime,acl 1 2
    LABEL=tmp /tmp ext4 noatime,acl 1 2
    # Entry for /dev/sda1 :
    LABEL=video /video ext4 noatime,acl 1 2
    #/dev/nvme0n1p3 swap swap defaults 0 0
    LABEL=swap swap swap defaults 0 0

    Looking like you did not set the partition name to swap. :(

    Reason I suggest it, if you install another OS, it would format
    swap and you would lose the label. Would not happen if swap has a
    partition name of swap. :)
    example snippet
    $ lsblk -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT,PARTLABEL
    ├─sdb1 8G swap swap [SWAP] swap






    result from script

    /dev/nvme0n1p1 /efi vfat users,noauto,umask=000,iocharset=utf8 0 0

    That should have converted to
    PARTLABEL=efi /efi vfat users,noauto,umask=000,iocharset=utf8 0 0

    You are running the latest script, so go ahead and run it as root.
    It will ask you to Install changed /etc/fstab

    If you hit enter or anything but yes, it will make no changes.

    verify /efi line now has
    PARTLABEL=efi /efi vfat users,noauto,umask=000,iocharset=utf8 0 0


    lsblk -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT,PARTLABEL | sort -V

    Please destroy that line wherever it exists. New line is
    lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT,LABEL,PARTLABEL


    I spent some time this morning - early and uninterrupted - trying
    different labels for the rescue partition.

    It was interesting.

    Editing both "grub.cfg" and the partition labels.

    "boot" works, but "boot_iso and boot-iso and bootiso and sysrescue" don't.

    If you have systemrescuecd-6.0.3.iso in the sysrescue partition (nvme0n1p6)
    you need to soft link it to systemrescuecd.iso Example:
    $ cd /spare
    $ ls -ahl sys*
    <snip> systemrescuecd-6.0.3.iso
    < snip> systemrescuecd.iso -> systemrescuecd-6.0.3.iso


    change partition NAME and Label to "boot_iso" and fix fstab.
    make the same changes in your /etc/grub.d/whatever_script_fn_here
    that I show in grub.cnf

    in grub.cnf you would have

    search --no-floppy --label boot_iso --set=root
    linux (loop)/sysresccd/boot/x86_64/vmlinuz img_label=boot_iso ......


    If it fails to work, start a new thread. Something like
    How do I get grub2 to boot a sysresccd.iso file?


    Dump your current script, /etc/fstab
    lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT,LABEL,PARTLABEL


    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Mon Sep 16 22:39:24 2019
    On 15/9/19 2:02 pm, Bit Twister wrote:

    Early morning again. It seems to be the guaranteed "non-interrupt" period

    Hmmm, when you are ready to start backing up into mageia_bu
    start a new thread. Suggest How do I create a hot backup?.
    I know I would not have the backup on the same device as source.
    If device fails, you lose both :-(


    Worse case - I have the install media on stick and disk :-)

    I don't run a hot enterprise setup like yours, Bits.
    And I've crashed and burned before.

    I have memories of many past desperate midnight recoveries :-(
    If I was really concerned I could also backup to a stick.


    I've successfully run the script V1.4 and rebooted a few times, all is well

    [root@unimatrix stream]# ./fstab-label-3.sh #********************************************************************
    #*
    #* /etc/fstab Version 1.4
    #* Created by ./fstab-label-3.sh Tue 17 Sep 06:41 2019
    #*
    #********************************************************************

    LABEL=mageia / ext4 noatime,acl 1 1
    PARTLABEL=efi /efi vfat users,noauto,umask=000,iocharset=utf8 0 0
    none /proc proc defaults 0 0
    LABEL=tmp /tmp ext4 noatime,acl 1 2
    LABEL=video /video ext4 noatime,acl 1 2
    PARTLABEL=swap swap swap defaults 0 0
    #****************** end /etc/fstab ******************
    '/etc/fstab' -> '/etc/fstab_bkup'

    ls -al /etc/fstab*
    -rw-r--r-- 1 root root 386 Sep 15 08:37 /etc/fstab
    -rw-r--r-- 1 root root 386 Sep 17 06:39 /etc/fstab.bkup
    -rw-r--r-- 1 root root 386 Sep 17 06:41 /etc/fstab_bkup
    -rw-r--r-- 1 root root 465 Sep 13 15:37 /etc/fstab_new
    -rw-r--r-- 1 root root 446 Sep 13 15:37 /etc/fstab_new_bkup
    -rw-r--r-- 1 root root 299 Aug 29 14:14 /etc/fstab.old
    -rw-r--r-- 1 root root 29 Aug 31 2016 /etc/fstab.rpmnew

    Install changed /root/tmp/fstab: yes or [no] yes
    '/root/tmp/fstab' -> '/etc/fstab'
    -rw-r--r-- 1 root root 531 Sep 17 06:41 /etc/fstab
    -rw-r--r-- 1 root root 386 Sep 17 06:39 /etc/fstab.bkup
    -rw-r--r-- 1 root root 386 Sep 17 06:41 /etc/fstab_bkup
    -rw-r--r-- 1 root root 465 Sep 13 15:37 /etc/fstab_new
    -rw-r--r-- 1 root root 446 Sep 13 15:37 /etc/fstab_new_bkup
    -rw-r--r-- 1 root root 299 Aug 29 14:14 /etc/fstab.old
    -rw-r--r-- 1 root root 29 Aug 31 2016 /etc/fstab.rpmnew
    removed '/root/tmp/fstab-label-3.sh.tmp'
    removed '/root/tmp/fstab'


    cat /etc/fstab #********************************************************************
    #*
    #* /etc/fstab Version 1.4
    #* Created by ./fstab-label-3.sh Tue 17 Sep 06:41 2019
    #*
    #********************************************************************

    LABEL=mageia / ext4 noatime,acl 1 1
    PARTLABEL=efi /efi vfat users,noauto,umask=000,iocharset=utf8 0 0
    none /proc proc defaults 0 0
    LABEL=tmp /tmp ext4 noatime,acl 1 2
    LABEL=video /video ext4 noatime,acl 1 2
    PARTLABEL=swap swap swap defaults 0 0
    #****************** end /etc/fstab ******************



    That is extremely neat, Bits!

    And so is this

    lsblk -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT,PARTLABEL
    NAME SIZE FSTYPE LABEL MOUNTPOINT PARTLABEL
    sda 5.5T
    └─sda1 5.5T ext4 video /video video
    sdb 29.7G
    └─sdb1 29.7G vfat
    sr0 1024M
    nvme0n1 119.2G
    ├─nvme0n1p1 299M vfat efi
    ├─nvme0n1p2 22.3G ext4 mageia / mageia
    ├─nvme0n1p3 10.6G swap swap [SWAP] swap
    ├─nvme0n1p4 12.2G ext4 tmp /tmp tmp
    ├─nvme0n1p5 20.4G ext4 mageia_bu mageia_bu
    └─nvme0n1p6 2G ext4 boot_iso boot_iso






    change partition NAME and Label to "boot_iso" and fix fstab.
    make the same changes in your /etc/grub.d/whatever_script_fn_here
    that I show in grub.cnf

    in grub.cnf you would have

    search --no-floppy --label boot_iso --set=root
    linux (loop)/sysresccd/boot/x86_64/vmlinuz img_label=boot_iso ......

    In my editing it was the "label=boot" line that I left unchanged, so of
    course it didn't work. sigh!

    I also have "sysrescuecd.iso" copied into the rescue partition
    "boot_iso". I have no link.
    The rescue partition works fine.. tested several times!!


    That has been quite an epic thread, Bits. Do we get the Gold medal??.

    The next one might be "Backing up"

    Thanks Bits, it has been fun and unnerving!!

    Learned a bit, though


    regards



    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.13-desktop-2.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Tue Sep 17 00:07:29 2019
    On Tue, 17 Sep 2019 07:39:24 +1000, faeychild wrote:


    lsblk -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT,PARTLABEL
    NAME SIZE FSTYPE LABEL MOUNTPOINT PARTLABEL
    sda 5.5T
    └─sda1 5.5T ext4 video /video video
    sdb 29.7G
    └─sdb1 29.7G vfat


    Go ahead and put partition name and label on /dev/sdb1

    ├─nvme0n1p1 299M vfat efi

    and put a label "efi" on /dev/nvme0n1p1

    And I can give you a script to automagically add any partitions to fstab
    where there is no fstab entry.


    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Tue Sep 17 22:27:59 2019
    On 17/9/19 9:07 am, Bit Twister wrote:
    On Tue, 17 Sep 2019 07:39:24 +1000, faeychild wrote:

    Go ahead and put partition name and label on /dev/sdb1


    sdb1 is a USB stick. It should have been pulled before lsblk was run.



    ├─nvme0n1p1 299M vfat efi

    and put a label "efi" on /dev/nvme0n1p1


    Gparted will not label efi. The progress bar cycles continually. Force
    cancel doesn't work. Gparted will not shutdown.
    I have to log out of the session


    And I can give you a script to automagically add any partitions to fstab where there is no fstab entry.



    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.13-desktop-2.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Wed Sep 18 00:20:15 2019
    On Wed, 18 Sep 2019 07:27:59 +1000, faeychild wrote:
    On 17/9/19 9:07 am, Bit Twister wrote:
    On Tue, 17 Sep 2019 07:39:24 +1000, faeychild wrote:

    Go ahead and put partition name and label on /dev/sdb1


    sdb1 is a USB stick. It should have been pulled before lsblk was run.

    Ok, go ahead and name/label it. :)




    ├─nvme0n1p1 299M vfat efi

    and put a label "efi" on /dev/nvme0n1p1


    Gparted will not label efi. The progress bar cycles continually. Force


    Now that is weird. I created/formatted an vfat (15bit) partition,
    changed partition flag to efi (hfs), I think,
    added/modified label and set name for the partition clicking Apply
    at each step and was not able to hang gparted. I was using the
    gparted installed on mga7, not the rescue disk.

    If it were I on your system, i would
    o load gparted on mga7,
    o create a new partition,
    o format it dos 16bit,
    o label it efinew,
    o name it efinew,
    o partition type msftdata
    o change flag esp & boot,
    clicking Apply at each step
    o select /efi
    o change flag to msftdata and uncheck esp & boot.
    o edit /etc/fstab and duplicate /efi line and change eif to efinew, example. PARTLABEL=efinew /efinew vfat users,noauto,umask=000,iocharset=utf8 0 0
    o mkdir /efinew
    o mount /efinew
    o mount /efi
    o rsync -aAHSXxv --delete /efi/ /efinew
    o use gparted to change /efi flag to msftdata
    verify you know location of sysemrescue media
    o reboot system system
    It should boot using efinew
    If it does boot, I suggest that you can remove/delete /ete /efi partition, remove /efinew from fstab, use gparted to change name/label efi.

    If the reboot failed, insert sysrescue media, run gparted
    o select /efi and set flag esp & boot
    o uncheck msftdata
    o select /efinew and delete/remove the partition.
    o reboot without rescue media

    On any of the above, Each step has to work before doing next step.

    --
    The warranty and liability expired as you read this message.
    If the above breaks your system, it's yours and you keep both pieces.
    Practice safe computing. Backup the file before you change it.
    Do a, man command_here or cat command_here, before using it.



    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Wed Sep 18 02:26:52 2019
    On 18/9/19 9:20 am, Bit Twister wrote:
    On Wed, 18 Sep 2019 07:27:59 +1000, faeychild wrote:
    On 17/9/19 9:07 am, Bit Twister wrote:
    On Tue, 17 Sep 2019 07:39:24 +1000, faeychild wrote:

    Go ahead and put partition name and label on /dev/sdb1


    sdb1 is a USB stick. It should have been pulled before lsblk was run.

    Ok, go ahead and name/label it. :)

    With a soft link spell to keep track :-)






    Now that is weird.

    It will be something nutty - stands to reason

    I created/formatted an vfat (15bit) partition,
    changed partition flag to efi (hfs), I think,
    added/modified label and set name for the partition clicking Apply
    at each step and was not able to hang gparted. I was using the
    gparted installed on mga7, not the rescue disk.

    If it were I on your system, i would
    o load gparted on mga7,
    o create a new partition,
    o format it dos 16bit,

    actually format to 16 bit is interesting

    <snip>

    it's in he brain file, Bits.

    I had an enormous amount of grief with the original GPT/EFI install- partitioning and fought tooth and claw with diskdrake which refused to recognize the partition

    From memory I think diskdrake eventually suggested "/boot/EFI". and I accepted.

    One day when I'm feeling brave and omnipotent I'll take another crack at
    it. But I don't want to trash the current system.



    regards



    --
    faeychild
    Running plasmashell 5.15.4 on 5.2.13-desktop-2.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.12A (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)