Page 1 of 2 12 LastLast
Results 1 to 10 of 24

Thread: Press Ctrl+C to skip file checks on every boot.

Hybrid View

  1. #1
    Join Date
    Jul 2015
    Location
    Essex, UK
    Beans
    871
    Distro
    Xubuntu

    Press Ctrl+C to skip file checks on every boot.

    I am using 24.04 with Ext4 file systems and every time I boot I get this option which suggest filesystem errors.

    I tried to use fsck from recovery mode with the following result:

    /lib/recovery-mode/recovery-menu: line 80: /etc/default/rxS: No such file or directory
    fsck from util-linux 2.39.3
    dev/nvme2nip5 is mounted.
    e2fsck: Cannot continue, aborting

    Contents of /lib/recovery-mode:

    Code:
      GNU nano 7.2                           recovery-menu                                      if [ "$choice" = "resume" ]; then
        box_text=$(eval_gettext "You are now going to exit the recovery mode and continue the>
    If that's the case, simply reboot from the login screen and then perform a standard boot.>
        whiptail --msgbox "$box_text" 12 70
        clear
        touch /run/friendly_recovery.resume
        systemctl daemon-reload
        systemctl --no-block isolate default.target
        exit
      fi
    
    
      /lib/recovery-mode/options/$choice test mode >/dev/null 2>&1
      retval=$?
    
    
      # Hack for the fsck case (needs to be cosidered read/write only when
      # in read-only mode and read-only only when in read/write mode)
      if [ "$choice" = "fsck" ] && [ "$READONLY" = "false" ]; then
        retval=1
      fi
    
    
      case "$retval" in
        0)
          # 0 => requires read/write
          if [ "$READONLY" = "true" ]; then
            box_text=$(eval_gettext "Continuing will remount your / filesystem in read/write >
    Do you wish to continue?")
            whiptail --yesno "$box_text" 10 70 || continue
    
    
            if [ "$choice" = "fsck" ]; then
                FSCHECK="true"
            fi
    
    
            . /etc/default/rcS
            if [ -d /run/systemd/system ]; then
                [ "$FSCKFIX" = "yes" ] && fsck_mode="-y" || fsck_mode='-a'
                [ "$FSCHECK" = "true" ] || [ -f /forcefsck ] && fsck $fsck_mode
                systemctl start --job-mode=ignore-dependencies systemd-remount-fs.service
                mount -a
            else
                [ "$FSCHECK" = "true" ] || [ -f /forcefsck ] && force_fsck="--force-fsck"
                [ "$FSCKFIX" = "yes" ] && fsck_fix="--fsck-fix"
                mountall $force_fsck $fsck_fix --no-events
            fi
            rm -f /forcefsck
    
    
            if [ "$choice" = "fsck" ]; then
              echo ""
              echo $(eval_gettext "Finished, please press ENTER")
              read TMP
            fi
    
    
            READONLY=false
          fi
        ;;
    
    
        1)
          # 1 => read-only only
          if [ "$READONLY" = "false" ]; then
            box_text=$(eval_gettext "The option you selected requires your filesystem to be in read-only mode. Unfortunately another option you selected earlier, made you exit this mode.
    The easiest way of getting back in read-only mode is to reboot your system.")
            whiptail --msgbox "$box_text" 12 70
            continue
          fi
        ;;
    
    
        2)
          # 2 => works in all cases
          # nothing to do
        ;;
      esac
    
    
      export READONLY
      /lib/recovery-mode/options/$choice
    done
    Code:
    makem@makem-22:~$ sudo grub-install --version[sudo] password for makem: 
    grub-install (GRUB) 2.12-1ubuntu7
    makem@makem-22:~$
    Searching the net for this missing file . /etc/default/rcS returns:

    . /etc/default/rcs
    /etc/default/rcS is a configuration file in older Ubuntu releases (pre-Systemd) that controls the behavior of the /etc/rcS</span>.d directory, which contains scripts executed during the boot process. This file is no longer relevant in Ubuntu 17.04 and later, as Systemd replaced Upstart and Initscripts.

    That suggests that there is a problem elsewhere. Can I get assistance please?

  2. #2
    Join Date
    Mar 2010
    Location
    Been there, meh.
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Press Ctrl+C to skip file checks on every boot.

    Code:
    dev/nvme2nip5 is mounted.
    e2fsck: Cannot continue, aborting
    is the important error.

    We cannot fsck any file system that is current mounted. One solution is to boot from any Ubuntu install ISO, enter Try Ubuntu mode, then run the fsck.

    In theory, at the grub menu, we can pick "Advanced" and enter the recovery console. There should be an option to fsck all file systems. For simple installs, I'd expect that to work, but if the install is complicated with other file systems or encryption, it may not work.

    We can force an fsck every xyz days on our file systems at boot. This is controlled using the tune2fs tool. I don't recall what the default is, but remember it wasn't what I wanted. It is set once per file system. It is on the file system, not necessarily on the partition, so be certain you point to the device file holding the file system. This matters if you use LVM, for example.

  3. #3
    Join Date
    Jul 2016
    Beans
    13
    Distro
    Ubuntu 24.04 Noble Numbat

    Re: Press Ctrl+C to skip file checks on every boot.

    If there is Windows present I would expect Windows partition corruption due caching of its partition(in Windows) as it is set by default when access from Ubuntu(btw Windows could also access Ubuntu via Total Commander plugin )...

    Ubuntu has some program this way but is not enabled by default to precache programs at start.

    So if there is UEFI fat partition for both systems, it could be one of the problem, but don't think so so eagarly, maybe there is better answer...

    And why the corruption? Because different drivers different behaviour(fat) and that is(or could be) also the ext4 way if different kernel means different bugs and lower driver version is unsupported(like booting data partition from newer Ubuntu in older Ubuntu install)

    maybe yes, maybe not I don't know if this is the problem...

  4. #4
    Join Date
    Jul 2015
    Location
    Essex, UK
    Beans
    871
    Distro
    Xubuntu

    Re: Press Ctrl+C to skip file checks on every boot.

    Quote Originally Posted by TheFu View Post
    Code:
    dev/nvme2nip5 is mounted.
    e2fsck: Cannot continue, aborting
    is the important error.

    We cannot fsck any file system that is current mounted. One solution is to boot from any Ubuntu install ISO, enter Try Ubuntu mode, then run the fsck.

    In theory, at the grub menu, we can pick "Advanced" and enter the recovery console. There should be an option to fsck all file systems. For simple installs, I'd expect that to work, but if the install is complicated with other file systems or encryption, it may not work.

    We can force an fsck every xyz days on our file systems at boot. This is controlled using the tune2fs tool. I don't recall what the default is, but remember it wasn't what I wanted. It is set once per file system. It is on the file system, not necessarily on the partition, so be certain you point to the device file holding the file system. This matters if you use LVM, for example.
    I do have a Windows dual boot system.

    I chose at grub menu, to pick "Advanced" and enter the recovery console. There was an option to fsck all file systems. It did not work.

    I will use the Ubuntu ISO method thanks. However I think it may be worth doing a check without repair first. I forget the syntax for that but will find it.

    Edit: sudo fsck -N /dev/sdx find errors sudo fsck -n /dev/sdx to print errors fsck -y /dev/sdx fix errors .
    Last edited by makem2; October 2nd, 2024 at 06:11 PM.

  5. #5
    Join Date
    May 2018
    Location
    Here and There
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Press Ctrl+C to skip file checks on every boot.

    You mean this in Advanced boot:
    Code:
    sudo fsck -f /
    BTW I see fsck at times as well on a one week old install of 24.04.

    What about smart-tools, have you checked that first.
    "When you practice gratefulness, there is a sense of respect toward others." >>Dalai Lama

  6. #6
    Join Date
    Jul 2015
    Location
    Essex, UK
    Beans
    871
    Distro
    Xubuntu

    Re: Press Ctrl+C to skip file checks on every boot.

    Quote Originally Posted by 1fallen2 View Post
    You mean this in Advanced boot:
    Code:
    sudo fsck -f /
    BTW I see fsck at times as well on a one week old install of 24.04.

    What about smart-tools, have you checked that first.
    No, I mean I chose Advanced Options followed by Recovery Mode. It didn't work.
    Last edited by makem2; October 2nd, 2024 at 07:19 PM. Reason: typo

  7. #7
    Join Date
    Jul 2015
    Location
    Essex, UK
    Beans
    871
    Distro
    Xubuntu

    Re: Press Ctrl+C to skip file checks on every boot.

    I used a 20.04 live usb:

    Code:
    xubuntu@xubuntu:~$ sudo fsck.ext4 -n /dev/nvme1n1p5
    e2fsck 1.45.5 (07-Jan-2020)
    /dev/nvme1n1p5: clean, 282818/2632672 files, 6332453/10530304 blocks
    xubuntu@xubuntu:~$ sudo fsck.ext4 -n /dev/nvme1n1p6
    e2fsck 1.45.5 (07-Jan-2020)
    /dev/nvme1n1p6: clean, 462013/5496832 files, 15392844/21972736 blocks
    xubuntu@xubuntu:~$ sudo fsck.ext4 -n /dev/nvme1n1p7
    e2fsck 1.45.5 (07-Jan-2020)
    /dev/nvme1n1p7 has unsupported feature(s): FEATURE_C12
    e2fsck: Get a newer version of e2fsck!
    
    
    games-steam: ********** WARNING: Filesystem still has errors **********
    
    
    xubuntu@xubuntu:~$
    So, the OS is ok but partitions, well 1 of them is not. Seems I need a newer version of e2fsck!. Maybe my current 24.04 has it, we will see. At least I can check them from my running system. games-steam has a windows connection

    Code:
    makem@makem-22:~$ sudo fsck.ext4 -n /dev/nvme1n1p7
    [sudo] password for makem: 
    e2fsck 1.47.0 (5-Feb-2023)
    Warning!  /dev/nvme1n1p7 is mounted.
    Warning: skipping journal recovery because doing a read-only filesystem check.
    games-steam: clean, 361/10911744 files, 11727348/43633920 blocks
    makem@makem-22:~$ sudo fsck.ext4 -n /dev/nvme1n1p7
    e2fsck 1.47.0 (5-Feb-2023)
    games-steam: clean, 361/10911744 files, 11727348/43633920 blocks
    makem@makem-22:~$
    Windows found errors on /data drive, offered to check and fix. After running said no errors found!

    Ubuntu still has same 'check file system' error though. Now I don't know where to go?
    Last edited by makem2; October 2nd, 2024 at 07:50 PM.

  8. #8
    Join Date
    Mar 2010
    Location
    Been there, meh.
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Press Ctrl+C to skip file checks on every boot.

    Code:
    Warning!  /dev/nvme1n1p7 is mounted.
    That needs to be fixed before you can run fsck. If you used a file manager and clicked on the partition, some file managers will mount it.

    Also, if the system has been touched by 24.04, you need to use a 24.04 ISO. Tools built in 2020 can't possibly know what tools and data in 2024 will need.

    I've never needed to specify the exact file system program. I let the fsck program figure out which file system specific tool should be used.

    I'd use AFTER ensuring it isn't mounted and has a native Linux file system.
    Code:
    sudo fsck -y  /dev/nvme1n1p7

  9. #9
    Join Date
    Jul 2015
    Location
    Essex, UK
    Beans
    871
    Distro
    Xubuntu

    Re: Press Ctrl+C to skip file checks on every boot.

    Quote Originally Posted by TheFu View Post
    Code:
    Warning!  /dev/nvme1n1p7 is mounted.
    That needs to be fixed before you can run fsck. If you used a file manager and clicked on the partition, some file managers will mount it.

    Also, if the system has been touched by 24.04, you need to use a 24.04 ISO. Tools built in 2020 can't possibly know what tools and data in 2024 will need.

    I've never needed to specify the exact file system program. I let the fsck program figure out which file system specific tool should be used.

    I'd use AFTER ensuring it isn't mounted and has a native Linux file system.
    Code:
    sudo fsck -y  /dev/nvme1n1p7
    The partition which seems to be causing the problem is NTFS which means that windows should deal with it. All ext4 partitions are clean. Two were checked via the live USB and the remaining one after unmounting i. The only others were the windows OS which it checked and found to be clean if you can believe the result which had an error which was not found when repairing by windows.

    Do you mean that it is still worth repeating with a 24.04 live USB the ext4 clean checks?

    I think I need to find out about smart-tools as maybe that can deal with both the ext4 and NTFS systems.
    Last edited by makem2; October 3rd, 2024 at 12:24 AM.

  10. #10
    Join Date
    May 2018
    Location
    Here and There
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Press Ctrl+C to skip file checks on every boot.

    I lost site of this thread, but I disabled mine boot wise.
    Code:
     sudo tune2fs -c 0 /dev/sdb2
    tune2fs 1.47.0 (5-Feb-2023)
    Setting maximal mount count to -1
    To re-enable if needed:
    Code:
    # tune2fs -c 1 -f /dev/sdx2
    But do change the /dev/sd?? to your ext4 partition.
    "When you practice gratefulness, there is a sense of respect toward others." >>Dalai Lama

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •