Error 2 while executing fsck swap

"fsck error 2" happens due to missing fsck binary, typo errors in executing file system check etc. Correcting the binary path and updating initramfs helps.

Server hard disks often show degraded performance due to file system errors. And, utilities like fsck is of great help in correcting the errors.

But, what if the utility itself report errors ? A typical error message appears as “fsck: error 2 (No such file or directory)“. Many times, this error happens due to missing fsck program in the server.

At Bobcares, we often see such fsck errors as part of our periodic server audits under Server Management Services.

Today, we’ll see the various reasons for “fsck error 2” and how our Dedicated Engineers solve it.

More details on FSCK

Website requests involve frequent reads and writes to/from the hard disk. As a result, it can often cause disk errors.

Verifying integrity of server hard disk periodically avoid potential website down issues. And, fsck (file system consistency check) utility comes as a boon to server administrators. In production servers, they schedule fsck automatically during boot time or at periodic intervals.

As fsck involves hard disk configuration directly, it always need a sound knowledge of the various disk partitions on the server. Therefore, our Support Engineers do a detailed study of hard disk partitions prior to any check. To check the consistency of a drive, say /dev/sda6, we execute the command:

fsck /dev/sda6

Fortunately, fsck command return couple of error codes depending on the results of the check. A typical operational error shows as:

"fsck: error 2 (No such file or directory) while executing fsck.ext4 for /dev/sdb1 fsck exited with status code 8"

What causes fsck error 2 ?

Now, its time to see the typical reasons for the “fsck error 2“. The exact reason can vary in different servers.

1. Missing fsck program

Missing fsck program often causes fsck errors. Usually, the fsck utility lies at the /sbin folder of the server. But, due to corrupt server binaries, or malformed packages, the fsck binary can be missing on the servers.

2. Typo in boot settings

Similarly, typo errors in specifying the boot settings may also result in fsck errors. The drive names should be always correct in boot settings of the server. For instance, while selecting to boot Ubuntu from a non-existing drive /dev/sbd,  it results in fsck errors too.

Possible fixes for fsck error 2

We just saw two reasons for the fsck error. Now, we’ll see the fixes that our Dedicated Engineers apply on the server.

1. Correcting binary path

Recently, one of our customers reported error while executing fsck on an ntfs partition of his server. He was getting the following error message.

fsck: fsck.ntfs: not found
fsck: error 2 while executing fsck.ntfs for /dev/sda2

On checking the server, we found that there was no fsck.ntfs under /sbin. Therefore, we had to create a symbolic link by executing:

ln -s /bin/ntfsfix /sbin/fsck.ntfs

2. Update initramfs

Again, when a customer had trouble booting up his fresh installed Ubuntu server, we solved it by updating initramfs on the server. The initramfs is a complete set of directories as in a normal root filesystem.

We first verified the boot settings on the server. Then, our Dedicated Engineers solved the problem by getting into Recovery mode from GRUB of the server.

At the Root Prompt of the server, we executed:

mount -o remount,rw /

We, then ran the command to update initramfs :

update-initramfs -c -k

Finally, restarted server using:

shutdown -r now

This booted the server correctly and solved the error.

[Finding fsck errors on the server? Our Server Experts can solve and correct your server.]

Conclusion

Precisely, “fsck error 2″ happens due to broken or missing binary, typo errors while executing file system check etc. Today, we saw the reasons for the error and how our Dedicated Engineers fix it.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

  • Печать

Страницы: [1]   Вниз

Тема: fsck выдает ошибку после бэкапа  (Прочитано 1203 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн
yaAton

Сделал я бэкап всей системы ubuntu 18.04.3 (tar -cpf xxx.tar.gz /). Понадобилось восстановить его. Форматнул диск sda2 (на sda1 находится efi-загрузчик refind, его не трогал), распаковал архив, поправил uid в /etc/fstab, создал новый файл /swapfile (старый не архивировал). Система запускается, все вроде работает. Но при каждой загрузке системы вижу невоодушевляющий текст: fsck: error 2 (No such file or directory) while executing fsck.ext4 for /dev/sda (именно /dev/sda безо всякой цифры).
При этом если загрузиться в live-режиме и вызвать fsck /dev/sda1 или fsck /dev/sda2 показывает, что все ok). Прежде при загрузках fsck показывал стандартный текст типа «/dev/sda2 clean».

Что это может значить и как избавиться от проблемы?

Вот /etc/fstab:


Оффлайн
yaAton

grep -rsh «DRDY» /var/log/ | wc -l

возвращает 0


Оффлайн
ALiEN175

sudo update-initramfs -u -k allи перезагрузка

ASUS P5K-C :: Intel Xeon E5450 @ 3.00GHz :: 8 GB DDR2 :: Radeon R7 260X :: XFCE
ACER 5750G :: Intel Core i5-2450M @ 2.50GHz :: 6 GB DDR3 :: GeForce GT 630M :: XFCE


Оффлайн
yaAton

ALiEN175, спасибо! После update-initramfs это сообщение пропало.
Правильно ли я понял, что fsck пытался проверить (восстановить?) фс на диске sda2 со старым uid-ом, и не найдя его возвращал эту error 8?

Посмотрел я вывод

journal | grep sda2
теперь там строки:

EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
EXT4-fs (sda2): re-mounted. Opts: errors=remount-ro

Это нормальный ход загрузки? Почему диск перемонтируется, произошла какая-то ошибка (errors=remount-ro)?


Оффлайн
ALiEN175

Это нормальный ход загрузки?

Да


Пользователь добавил сообщение 03 Сентября 2019, 20:34:15:


Правильно ли я понял, что fsck пытался проверить (восстановить?) фс на диске sda2 со старым uid-ом, и не найдя его возвращал эту error 8?

Просто в образе initramfs старые записи остались. 

« Последнее редактирование: 03 Сентября 2019, 20:34:15 от ALiEN175 »

ASUS P5K-C :: Intel Xeon E5450 @ 3.00GHz :: 8 GB DDR2 :: Radeon R7 260X :: XFCE
ACER 5750G :: Intel Core i5-2450M @ 2.50GHz :: 6 GB DDR3 :: GeForce GT 630M :: XFCE


  • Печать

Страницы: [1]   Вверх

Model: ATA SAMSUNG HD103SJ (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos


Number  Start   End     Size    Type      File system     Flags
 1      1049kB  106MB   105MB   primary   ntfs            boot
 2      106MB   838GB   838GB   primary   ntfs
 3      838GB   1000GB  162GB   extended
 5      838GB   855GB   16.5GB  logical   ext4
 6      855GB   858GB   3492MB  logical   linux-swap(v1)
 7      858GB   1000GB  142GB   logical   ext4




Model: ATA ST3320418AS (scsi)
Disk /dev/sdb: 320GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos


Number  Start   End    Size    Type      File system     Flags
 1      1049kB  311GB  311GB   primary   ext4            boot
 2      311GB   320GB  8587MB  extended
 5      311GB   320GB  8587MB  logical   linux-swap(v1)
   Boot Info Script 0.61      [1 April 2012]




============================= Boot Info Summary: ===============================


 => Windows is installed in the MBR of /dev/sda.
 => Grub2 (v1.99) is installed in the MBR of /dev/sdb and looks at sector 1 of 
    the same hard drive for core.img. core.img is at this location and looks 
    for (,msdos1)/boot/grub on this drive.


sda1: __________________________________________________________________________


    File system:       ntfs
    Boot sector type:  Windows Vista/7: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /bootmgr /Boot/BCD


sda2: __________________________________________________________________________


    File system:       ntfs
    Boot sector type:  Windows Vista/7: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows 7
    Boot files:        /Windows/System32/winload.exe


sda3: __________________________________________________________________________


    File system:       Extended Partition
    Boot sector type:  -
    Boot sector info: 


sda5: __________________________________________________________________________


    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Arch Linux ()
    Boot files:        /etc/fstab


sda6: __________________________________________________________________________


    File system:       swap
    Boot sector type:  -
    Boot sector info: 


sda7: __________________________________________________________________________


    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        


sdb1: __________________________________________________________________________


    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Ubuntu 12.04.2 LTS
    Boot files:        /boot/grub/grub.cfg /etc/fstab 
                       /boot/extlinux/extlinux.conf /boot/grub/core.img


sdb2: __________________________________________________________________________


    File system:       Extended Partition
    Boot sector type:  Unknown
    Boot sector info: 


sdb5: __________________________________________________________________________


    File system:       swap
    Boot sector type:  -
    Boot sector info: 


============================ Drive/Partition Info: =============================


Drive: sda _____________________________________________________________________


Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes


Partition  Boot  Start Sector    End Sector  # of Sectors  Id System


/dev/sda1    *          2,048       206,847       204,800   7 NTFS / exFAT / HPFS
/dev/sda2             206,848 1,637,087,231 1,636,880,384   7 NTFS / exFAT / HPFS
/dev/sda3       1,637,087,232 1,953,523,711   316,436,480   5 Extended
/dev/sda5       1,637,089,280 1,669,365,759    32,276,480  83 Linux
/dev/sda6       1,669,367,808 1,676,187,647     6,819,840  82 Linux swap / Solaris
/dev/sda7       1,676,189,696 1,953,523,711   277,334,016  83 Linux




Drive: sdb _____________________________________________________________________


Disk /dev/sdb: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes


Partition  Boot  Start Sector    End Sector  # of Sectors  Id System


/dev/sdb1    *          2,048   608,368,639   608,366,592  83 Linux
/dev/sdb2         608,370,686   625,141,759    16,771,074   5 Extended
/dev/sdb5         608,370,688   625,141,759    16,771,072  82 Linux swap / Solaris




"blkid" output: ________________________________________________________________


Device           UUID                                   TYPE       LABEL


/dev/sda1        12923898923881F1                       ntfs       System Reserved
/dev/sda2        3AF04536F044FA21                       ntfs       
/dev/sda5        0e2597fd-b847-4da2-8b58-73fd216ad1f8   ext4       
/dev/sda6        798fd669-f356-4594-a516-dfc75ebf9dcb   swap       
/dev/sda7        2d3b4dd4-0b86-4171-a618-ec0846bc83be   ext4       
/dev/sdb1        761353a7-7c9d-46c2-8bfb-301ea1637546   ext4       
/dev/sdb5        908e0cfd-b0ab-46bb-8ec9-62d5c962442e   swap       


================================ Mount points: =================================


Device           Mount_Point              Type       Options


/dev/sda5        /media/0e2597fd-b847-4da2-8b58-73fd216ad1f8 ext4       (rw,nosuid,nodev,uhelper=udisks)
/dev/sda7        /media/2d3b4dd4-0b86-4171-a618-ec0846bc83be ext4       (rw,nosuid,nodev,uhelper=udisks)
/dev/sdb1        /                        ext4       (rw,errors=remount-ro)




=============================== sda5/etc/fstab: ================================


--------------------------------------------------------------------------------
# 
# /etc/fstab: static file system information
#
# <file system>    <dir>    <type>    <options>    <dump>    <pass>
# /dev/sda5
UUID=0e2597fd-b847-4da2-8b58-73fd216ad1f8    /             ext4          rw,relatime,data=ordered    0 1


# /dev/sda7
UUID=2d3b4dd4-0b86-4171-a618-ec0846bc83be    /home         ext4          rw,relatime,data=ordered    0 2


# /dev/sda6
UUID=798fd669-f356-4594-a516-dfc75ebf9dcb    none          swap          defaults      0 0


--------------------------------------------------------------------------------


=================== sda5: Location of files loaded by Grub: ====================


           GiB - GB             File                                 Fragment(s)


 780.872230530 = 838.455173120  boot/initramfs-linux-fallback.img              1
 788.821151733 = 846.990262272  boot/initramfs-linux.img                       1
 788.753322601 = 846.917431296  boot/vmlinuz-linux                             1


=========================== sdb1/boot/grub/grub.cfg: ===========================


--------------------------------------------------------------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#


### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi


function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}


function recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}


function load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}


insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 761353a7-7c9d-46c2-8bfb-301ea1637546
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  insmod part_msdos
  insmod ext2
  set root='(hd1,msdos1)'
  search --no-floppy --fs-uuid --set=root 761353a7-7c9d-46c2-8bfb-301ea1637546
  set locale_dir=($root)/boot/grub/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###


### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 44,0,30; then
  clear
fi
### END /etc/grub.d/05_debian_theme ###


### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
    set gfxpayload="${1}"
    if [ "${1}" = "keep" ]; then
        set vt_handoff=vt.handoff=7
    else
        set vt_handoff=
    fi
}
if [ "${recordfail}" != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "${linux_gfx_mode}" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 3.2.0-45-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    gfxmode $linux_gfx_mode
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos1)'
    search --no-floppy --fs-uuid --set=root 761353a7-7c9d-46c2-8bfb-301ea1637546
    linux    /boot/vmlinuz-3.2.0-45-generic-pae root=UUID=761353a7-7c9d-46c2-8bfb-301ea1637546 ro   quiet splash $vt_handoff
    initrd    /boot/initrd.img-3.2.0-45-generic-pae
}
menuentry 'Ubuntu, with Linux 3.2.0-45-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos1)'
    search --no-floppy --fs-uuid --set=root 761353a7-7c9d-46c2-8bfb-301ea1637546
    echo    'Loading Linux 3.2.0-45-generic-pae ...'
    linux    /boot/vmlinuz-3.2.0-45-generic-pae root=UUID=761353a7-7c9d-46c2-8bfb-301ea1637546 ro recovery nomodeset 
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-3.2.0-45-generic-pae
}
submenu "Previous Linux versions" {
menuentry 'Ubuntu, with Linux 3.2.0-40-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    gfxmode $linux_gfx_mode
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos1)'
    search --no-floppy --fs-uuid --set=root 761353a7-7c9d-46c2-8bfb-301ea1637546
    linux    /boot/vmlinuz-3.2.0-40-generic-pae root=UUID=761353a7-7c9d-46c2-8bfb-301ea1637546 ro   quiet splash $vt_handoff
    initrd    /boot/initrd.img-3.2.0-40-generic-pae
}
menuentry 'Ubuntu, with Linux 3.2.0-40-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos1)'
    search --no-floppy --fs-uuid --set=root 761353a7-7c9d-46c2-8bfb-301ea1637546
    echo    'Loading Linux 3.2.0-40-generic-pae ...'
    linux    /boot/vmlinuz-3.2.0-40-generic-pae root=UUID=761353a7-7c9d-46c2-8bfb-301ea1637546 ro recovery nomodeset 
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-3.2.0-40-generic-pae
}
menuentry 'Ubuntu, with Linux 3.2.0-39-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    gfxmode $linux_gfx_mode
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos1)'
    search --no-floppy --fs-uuid --set=root 761353a7-7c9d-46c2-8bfb-301ea1637546
    linux    /boot/vmlinuz-3.2.0-39-generic-pae root=UUID=761353a7-7c9d-46c2-8bfb-301ea1637546 ro   quiet splash $vt_handoff
    initrd    /boot/initrd.img-3.2.0-39-generic-pae
}
menuentry 'Ubuntu, with Linux 3.2.0-39-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos1)'
    search --no-floppy --fs-uuid --set=root 761353a7-7c9d-46c2-8bfb-301ea1637546
    echo    'Loading Linux 3.2.0-39-generic-pae ...'
    linux    /boot/vmlinuz-3.2.0-39-generic-pae root=UUID=761353a7-7c9d-46c2-8bfb-301ea1637546 ro recovery nomodeset 
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-3.2.0-39-generic-pae
}
menuentry 'Ubuntu, with Linux 3.2.0-37-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    gfxmode $linux_gfx_mode
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos1)'
    search --no-floppy --fs-uuid --set=root 761353a7-7c9d-46c2-8bfb-301ea1637546
    linux    /boot/vmlinuz-3.2.0-37-generic-pae root=UUID=761353a7-7c9d-46c2-8bfb-301ea1637546 ro   quiet splash $vt_handoff
    initrd    /boot/initrd.img-3.2.0-37-generic-pae
}
menuentry 'Ubuntu, with Linux 3.2.0-37-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos1)'
    search --no-floppy --fs-uuid --set=root 761353a7-7c9d-46c2-8bfb-301ea1637546
    echo    'Loading Linux 3.2.0-37-generic-pae ...'
    linux    /boot/vmlinuz-3.2.0-37-generic-pae root=UUID=761353a7-7c9d-46c2-8bfb-301ea1637546 ro recovery nomodeset 
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-3.2.0-37-generic-pae
}
menuentry 'Ubuntu, with Linux 3.2.0-36-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    gfxmode $linux_gfx_mode
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos1)'
    search --no-floppy --fs-uuid --set=root 761353a7-7c9d-46c2-8bfb-301ea1637546
    linux    /boot/vmlinuz-3.2.0-36-generic-pae root=UUID=761353a7-7c9d-46c2-8bfb-301ea1637546 ro   quiet splash $vt_handoff
    initrd    /boot/initrd.img-3.2.0-36-generic-pae
}
menuentry 'Ubuntu, with Linux 3.2.0-36-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos1)'
    search --no-floppy --fs-uuid --set=root 761353a7-7c9d-46c2-8bfb-301ea1637546
    echo    'Loading Linux 3.2.0-36-generic-pae ...'
    linux    /boot/vmlinuz-3.2.0-36-generic-pae root=UUID=761353a7-7c9d-46c2-8bfb-301ea1637546 ro recovery nomodeset 
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-3.2.0-36-generic-pae
}
menuentry 'Ubuntu, with Linux 3.2.0-35-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    gfxmode $linux_gfx_mode
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos1)'
    search --no-floppy --fs-uuid --set=root 761353a7-7c9d-46c2-8bfb-301ea1637546
    linux    /boot/vmlinuz-3.2.0-35-generic-pae root=UUID=761353a7-7c9d-46c2-8bfb-301ea1637546 ro   quiet splash $vt_handoff
    initrd    /boot/initrd.img-3.2.0-35-generic-pae
}
menuentry 'Ubuntu, with Linux 3.2.0-35-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos1)'
    search --no-floppy --fs-uuid --set=root 761353a7-7c9d-46c2-8bfb-301ea1637546
    echo    'Loading Linux 3.2.0-35-generic-pae ...'
    linux    /boot/vmlinuz-3.2.0-35-generic-pae root=UUID=761353a7-7c9d-46c2-8bfb-301ea1637546 ro recovery nomodeset 
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-3.2.0-35-generic-pae
}
menuentry 'Ubuntu, with Linux 3.0.0-29-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    gfxmode $linux_gfx_mode
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos1)'
    search --no-floppy --fs-uuid --set=root 761353a7-7c9d-46c2-8bfb-301ea1637546
    linux    /boot/vmlinuz-3.0.0-29-generic-pae root=UUID=761353a7-7c9d-46c2-8bfb-301ea1637546 ro   quiet splash $vt_handoff
    initrd    /boot/initrd.img-3.0.0-29-generic-pae
}
menuentry 'Ubuntu, with Linux 3.0.0-29-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos1)'
    search --no-floppy --fs-uuid --set=root 761353a7-7c9d-46c2-8bfb-301ea1637546
    echo    'Loading Linux 3.0.0-29-generic-pae ...'
    linux    /boot/vmlinuz-3.0.0-29-generic-pae root=UUID=761353a7-7c9d-46c2-8bfb-301ea1637546 ro recovery nomodeset 
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-3.0.0-29-generic-pae
}
menuentry 'Ubuntu, with Linux 2.6.38-11-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    gfxmode $linux_gfx_mode
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos1)'
    search --no-floppy --fs-uuid --set=root 761353a7-7c9d-46c2-8bfb-301ea1637546
    linux    /boot/vmlinuz-2.6.38-11-generic-pae root=UUID=761353a7-7c9d-46c2-8bfb-301ea1637546 ro   quiet splash $vt_handoff
    initrd    /boot/initrd.img-2.6.38-11-generic-pae
}
menuentry 'Ubuntu, with Linux 2.6.38-11-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos1)'
    search --no-floppy --fs-uuid --set=root 761353a7-7c9d-46c2-8bfb-301ea1637546
    echo    'Loading Linux 2.6.38-11-generic-pae ...'
    linux    /boot/vmlinuz-2.6.38-11-generic-pae root=UUID=761353a7-7c9d-46c2-8bfb-301ea1637546 ro recovery nomodeset 
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-2.6.38-11-generic-pae
}
}
### END /etc/grub.d/10_linux ###


### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###


### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos1)'
    search --no-floppy --fs-uuid --set=root 761353a7-7c9d-46c2-8bfb-301ea1637546
    linux16    /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos1)'
    search --no-floppy --fs-uuid --set=root 761353a7-7c9d-46c2-8bfb-301ea1637546
    linux16    /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###


### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set=root 12923898923881F1
    chainloader +1
}
menuentry "Arch (on /dev/sda5)" --class gnu-linux --class gnu --class os {
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos5)'
    search --no-floppy --fs-uuid --set=root 0e2597fd-b847-4da2-8b58-73fd216ad1f8
    linux /boot/vmlinuz-linux root=/dev/sda5
    initrd /boot/initramfs-linux.img
}
### END /etc/grub.d/30_os-prober ###


### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###


### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###


### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------


=============================== sdb1/etc/fstab: ================================


--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
/dev/sda1       /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=908e0cfd-b0ab-46bb-8ec9-62d5c962442e none            swap    sw              0       0
--------------------------------------------------------------------------------


====================== sdb1/boot/extlinux/extlinux.conf: =======================


--------------------------------------------------------------------------------
## /boot/extlinux/extlinux.conf
##
## IMPORTANT WARNING
##
## The configuration of this file is generated automatically.
## Do not edit this file manually, use: extlinux-update




default l0
prompt 1
timeout 50


include themes/debian/theme.cfg
--------------------------------------------------------------------------------


=================== sdb1: Location of files loaded by Grub: ====================


           GiB - GB             File                                 Fragment(s)


 136.153617859 = 146.193833984  boot/grub/core.img                             1
 139.696758270 = 149.998252032  boot/grub/grub.cfg                             1
  33.680664062 = 36.164337664   boot/initrd.img-2.6.38-11-generic-pae          2
 185.881027222 = 199.588233216  boot/initrd.img-3.0.0-29-generic-pae           1
 196.701667786 = 211.206807552  boot/initrd.img-3.2.0-35-generic-pae           2
 142.428234100 = 152.931151872  boot/initrd.img-3.2.0-36-generic-pae           1
 233.606384277 = 250.832945152  boot/initrd.img-3.2.0-37-generic-pae           2
 243.634876251 = 261.600956416  boot/initrd.img-3.2.0-39-generic-pae           2
  91.397224426 = 98.137022464   boot/initrd.img-3.2.0-40-generic-pae           2
  83.785449982 = 89.963941888   boot/initrd.img-3.2.0-45-generic-pae           2
 136.864688873 = 146.957340672  boot/vmlinuz-2.6.38-11-generic-pae             2
  69.837486267 = 74.987429888   boot/vmlinuz-3.0.0-29-generic-pae              2
 172.240028381 = 184.941322240  boot/vmlinuz-3.2.0-35-generic-pae              1
 140.431434631 = 150.787104768  boot/vmlinuz-3.2.0-36-generic-pae              1
 140.931434631 = 151.323975680  boot/vmlinuz-3.2.0-37-generic-pae              2
 230.622840881 = 247.629389824  boot/vmlinuz-3.2.0-39-generic-pae              1
 243.372844696 = 261.319602176  boot/vmlinuz-3.2.0-40-generic-pae              1
  12.529094696 = 13.453012992   boot/vmlinuz-3.2.0-45-generic-pae              2
  83.785449982 = 89.963941888   initrd.img                                     2
  91.397224426 = 98.137022464   initrd.img.old                                 2
  12.529094696 = 13.453012992   vmlinuz                                        2
 243.372844696 = 261.319602176  vmlinuz.old                                    1


================= sdb1: Location of files loaded by Syslinux: ==================


           GiB - GB             File                                 Fragment(s)


  16.136688232 = 17.326637056   boot/extlinux/chain.c32                        1
  16.136165619 = 17.326075904   boot/extlinux/extlinux.conf                    1


============== sdb1: Version of COM32(R) files used by Syslinux: ===============


 boot/extlinux/chain.c32            :  COM32R module (v4.xx)


======================== Unknown MBRs/Boot Sectors/etc: ========================


Unknown BootLoader on sdb2


00000000  28 8b 84 06 d5 fc 02 0f  94 d8 6c 2a 33 53 f7 c5  |(.........l*3S..|
00000010  6c 7a 01 78 a4 6a 25 2b  d5 7f 2e 2e 91 bb bf 6f  |lz.x.j%+.......o|
00000020  67 85 6a cb d5 cb fb 9e  e4 f4 f7 84 71 13 80 61  |g.j.........q..a|
00000030  73 e4 96 fb c5 29 81 57  41 85 93 7c c0 3c 5f ff  |s....).WA..|.<_.|
00000040  30 a5 c4 2c 64 46 c9 57  bb 35 6f e1 1f 53 54 10  |0..,dF.W.5o..ST.|
00000050  ad c0 78 1b 9f d0 7c 9f  fe db 3e b6 f7 93 b6 91  |..x...|...>.....|
00000060  53 74 f7 a4 ff 72 cb d1  76 34 42 44 92 5f e5 0f  |St...r..v4BD._..|
00000070  a0 71 7a 80 56 bc 4a 2e  6d 4d 3e fb 5f 53 16 b9  |.qz.V.J.mM>._S..|
00000080  34 c4 74 c3 54 03 31 a9  d3 fd db 01 4d 05 4f b6  |4.t.T.1.....M.O.|
00000090  34 63 de 06 1f 8f 00 34  4a 54 af ca 40 e8 ef 5a  |4c.....4JT..@..Z|
000000a0  4a 35 aa 9b c5 f8 35 06  54 0c 3f 1f 55 4a cb 87  |J5....5.T.?.UJ..|
000000b0  f1 8c bf 18 17 5e 7e 3f  d4 0d b8 14 d9 02 e1 5b  |.....^~?.......[|
000000c0  0c 24 7f 55 0f d5 de 8e  ab fd 7f e2 f9 c4 04 c1  |.$.U............|
000000d0  00 49 2f 90 7e ab e2 20  97 01 8b 41 8c 84 2b e1  |.I/.~.. ...A..+.|
000000e0  d7 c7 fa 07 95 7b a3 d4  89 79 4f ff 14 f9 40 d0  |.....{...yO...@.|
000000f0  0a 60 a0 2a 09 80 f0 14  0e 07 07 14 8f 41 8e aa  |.`.*.........A..|
00000100  a3 f5 42 32 9d 1d c6 8e  84 20 60 84 10 44 a0 65  |..B2..... `..D.e|
00000110  7b e1 de cf c1 dd 11 4b  ac e6 36 19 17 78 1e 02  |{......K..6..x..|
00000120  04 55 62 50 96 a3 fa 3c  56 3b f7 c9 60 05 aa 04  |.UbP...<V;..`...|
00000130  18 07 a2 9a c9 e0 53 0b  05 10 2c 12 36 1c 19 58  |......S...,.6..X|
00000140  41 07 80 ff 24 18 bc 19  5f 95 84 01 2c bc 78 24  |A...$..._...,.x$|
00000150  09 03 f5 65 de 12 15 73  c0 73 ea 22 95 ce 2a 65  |...e...s.s."..*e|
00000160  40 81 c7 d1 fa aa a8 03  c0 35 4f b3 47 f4 7f 90  |@........5O.G...|
00000170  0b 8a c4 b0 84 0f 07 ff  98 42 f8 3c 37 fe 22 52  |.........B.<7."R|
00000180  00 3e e9 c3 04 60 79 04  c2 a2 97 09 40 cd 78 8b  |.>...`y.....@.x.|
00000190  61 df 17 73 ce d7 1a 4c  9f e7 b4 0e 04 36 69 c0  |a..s...L.....6i.|
000001a0  63 1b 2e 1e 7a 81 a9 25  58 18 58 10 b6 b8 19 de  |c...z..%X.X.....|
000001b0  4a 89 72 07 a6 48 4a d9  5b 72 a4 94 f0 91 00 fe  |J.r..HJ.[r......|
000001c0  ff ff 82 fe ff ff 02 00  00 00 00 e8 ff 00 00 00  |................|
000001d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|
00000200




=============================== StdErr Messages: ===============================


xz: (stdin): Compressed data is corrupt
/dev/sda1: LABEL="System Reserved" UUID="12923898923881F1" TYPE="ntfs" 
/dev/sda2: UUID="3AF04536F044FA21" TYPE="ntfs" 
/dev/sda5: UUID="0e2597fd-b847-4da2-8b58-73fd216ad1f8" TYPE="ext4" 
/dev/sda6: UUID="798fd669-f356-4594-a516-dfc75ebf9dcb" TYPE="swap" 
/dev/sda7: UUID="2d3b4dd4-0b86-4171-a618-ec0846bc83be" TYPE="ext4" 
/dev/sdb1: UUID="761353a7-7c9d-46c2-8bfb-301ea1637546" TYPE="ext4" 
/dev/sdb5: UUID="908e0cfd-b0ab-46bb-8ec9-62d5c962442e" TYPE="swap"
# 
# /etc/fstab: static file system information
#
# <file system>    <dir>    <type>    <options>    <dump>    <pass>
# /dev/sda5
UUID=0e2597fd-b847-4da2-8b58-73fd216ad1f8    /             ext4          rw,relatime,data=ordered    0 1


# /dev/sda7
UUID=2d3b4dd4-0b86-4171-a618-ec0846bc83be    /home         ext4          rw,relatime,data=ordered    0 2


# /dev/sda6
UUID=798fd669-f356-4594-a516-dfc75ebf9dcb    none          swap          defaults      0 0
  • Home
  • Forum
  • The Ubuntu Forum Community
  • Ubuntu Official Flavours Support
  • New to Ubuntu
  • [SOLVED] fsck: error 2 (No such file or directory) while executing fsck.ext2 for /dev/sbd4

  1. Question fsck: error 2 (No such file or directory) while executing fsck.ext2 for /dev/sbd4

    Firefox had stopped working and had closed my browser window and would not let me open a new one until I had closed the old one but I couldn’t, so I restarted my computer. After selecting to boot Ubuntu, my screen showed the following:

    /dev/sbd4 contains a file system with errors, check forced.
    Inodes that were part of a corrupted orphan linked list found.

    /dev/sbd4: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
    (i.e., without -a or -p options)
    fsck exited with status code 4
    done.
    Failure: File system check of the root filesystem failed
    The root filesystem on /dev/sbd4 requires a manual fsck

    BusyBox v1.22.1 (Ubuntu 1:1.22.0-15ubuntu1) built-in shell (ash)
    Enter ‘help’ for a list of built in commands.

    So, then I tried that and got this:

    (initramfs) fsck /dev/sbd4
    fsck from util-linux 2.27.1
    fsck: error 2 (No such file or directory) while executing fsck.ext2 for /dev/sbd4

    What do I do to fix this? I am able to see all of my partitions when I boot from usb to try Ubuntu.

    Last edited by gregcb; February 27th, 2017 at 04:30 AM.


  2. Re: fsck: error 2 (No such file or directory) while executing fsck.ext2 for /dev/sbd4

    gregcb; Hellol

    One must run a file system check from an external means — can not test/check/repair a file system while in use ( mounted )/
    Further in grub .. grub will not understand a identifier such as sdb4 — that is not in grub speak .

    So what we do is work from say a liveUSB from the try ubuntu terminal.
    Make sure that the target remains identified as ‘sdb’ , Depending on when a device is recognized by the system is what the device name is given.

    now «assuming» that the target remains as ‘sdb4’ then run:
    Make sure swap is not in use:

    Code:

    sudo e2fsck -C0 -p -f -v /dev/sdb4

    if errors: -y auto answers yes for fixes needing response see: man e2fsck

    Code:

    sudo e2fsck -f -y -v /dev/sdb4

    hope is that all is fixed right up


  3. Re: fsck: error 2 (No such file or directory) while executing fsck.ext2 for /dev/sbd4

    . . . are you sure it’s not just a simple typo?rather than


  4. Re: fsck: error 2 (No such file or directory) while executing fsck.ext2 for /dev/sbd4

    Wow… thanks for pointing that out.


Bookmarks

Bookmarks


Posting Permissions

hughparker1

Posts: 177
Joined: 2014-10-09 21:53
Location: Paisley, United Kingdom

[SOLVED] fsck error2 (No such file or directory)while execut

#1

Post

by hughparker1 » 2016-02-13 23:12

I have just installed debian-live-8.3.0-i386-lxde-desktop+nonfree.iso on my old hp530 32-bit laptop

I am getting the following message when I boot my laptop…

Code: Select all

Loading, please wait...
fsck from util-linux 2.25.2
fsck error 2 (No such file or directory) while executing fsck.ext4 for /dev/sda1
fsck exited with status code 8
[  13.941532] systemd-fsck[145]: DEBIAN8: clean,140919/640848 files, 978992/2560942 blocks

… after about 30 seconds it boots ok

here is output for my fstab…

Code: Select all

hugh@hp530-Debian-8:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=a7cfc5df-3a0b-4f21-b24a-a4a86a41918c /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda7 during installation
UUID=8a11c0aa-cf07-48ad-a149-5fc68325ea12 none            swap    sw              0       0
hugh@hp530-Debian-8:~$ 

here is output for blkid…

Code: Select all

hugh@hp530-Debian-8:~$ sudo blkid
[sudo] password for hugh: 
/dev/sda1: LABEL="DEBIAN8" UUID="a7cfc5df-3a0b-4f21-b24a-a4a86a41918c" TYPE="ext4" PARTUUID="84fc84fc-01"
/dev/sda3: LABEL="OE_SYSTEM" UUID="f75e6bcb-f5b8-45af-9ecc-2cce64fa6ed7" TYPE="ext4" PARTUUID="84fc84fc-03"
/dev/sda4: LABEL="OE_DATA" UUID="594c7f52-4e98-406d-9100-feb9afaf211b" TYPE="ext4" PARTUUID="84fc84fc-04"
/dev/sda5: LABEL="XUBUNTU" UUID="8dff0a35-a695-426f-8338-a4167bf2b699" TYPE="ext4" PARTUUID="84fc84fc-05"
/dev/sda6: LABEL="XUBUNTU-HOME" UUID="356e3488-d7e8-4426-b29b-6bfe0027d9f6" TYPE="ext4" PARTUUID="84fc84fc-06"
/dev/sda7: UUID="8a11c0aa-cf07-48ad-a149-5fc68325ea12" TYPE="swap" PARTUUID="84fc84fc-07"
/dev/sda8: LABEL="BACKUP" UUID="19931db4-b791-49ba-9b9d-49dad02b41fd" TYPE="ext4" PARTUUID="84fc84fc-08"
/dev/sda9: LABEL="LUBUNTU" UUID="d2e0f0e2-9893-4100-8782-08e92d8bcd2a" TYPE="ext4" PARTUUID="84fc84fc-09"
/dev/sda10: LABEL="LUBUNTU-HOME" UUID="b30a3420-44fc-4687-b306-396b315b32d7" TYPE="ext4" PARTUUID="84fc84fc-0a"
/dev/sda11: LABEL="DEBIAN" UUID="116e57be-4b58-4ace-b016-72d326267ed6" TYPE="ext4" PARTUUID="84fc84fc-0b"
/dev/sda12: LABEL="DEBIAN-HOME" UUID="6e664fa0-7884-4266-9334-81199adf9c50" TYPE="ext4" PARTUUID="84fc84fc-0c"
hugh@hp530-Debian-8:~$ 

I don’t have enough technical knowledge to determine what is causing this error message, if anyone can help I would be grateful. I am still learning linux but I can use terminal if I know the correct syntax to use. Thanks in advance.

Last edited by hughparker1 on 2016-02-14 01:43, edited 1 time in total.


User avatar

ralph.ronnquist

Posts: 342
Joined: 2015-12-19 01:07
Location: Melbourne, Australia
Been thanked: 6 times

Re: fsck error 2 (No such file or directory)while executing

#2

Post

by ralph.ronnquist » 2016-02-14 00:18

Having spent a little bit of @dasein’s billions, I’ve found a probably relevant documentation at
https://www.freedesktop.org/software/sy … rator.html

It suggests that there’s systemd magic involved to mount other and more partitions than those mentioned in /etc/fstab.

A remedy against this magic would be the following command sequence:

Code: Select all

# mkdir -p /etc/systemd/system-generators
# ln -s /dev/null /etc/systemd/system-generators/systemd-gpt-auto-generator

In systemd speak (with AU-SE accent), that will set up an «override» for the systemd-gpt-auto-generator unit with the effect of avoiding the default implementation.

Note, it might resolve your fsck issue, and otherwise you should revert until it’s resolved.



hughparker1

Posts: 177
Joined: 2014-10-09 21:53
Location: Paisley, United Kingdom

Re: fsck error 2 (No such file or directory)while executing

#4

Post

by hughparker1 » 2016-02-14 01:41

spacex wrote:fstab looks fine as far as I can tell. I can’t find the source now, but I think I recall that rebuilding the initramfs solved it for a user.
As root, or by sudo:

Then reboot…
Probably not going to work, but it can’t hurt either.

I entered the code you suggested ….

Code: Select all

hugh@hp530-Debian-8:~$ sudo update-initramfs -u
[sudo] password for hugh: 
update-initramfs: Generating /boot/initrd.img-3.16.0-4-686-pae
live-boot: core filesystems devices utils udev wget blockdev.
hugh@hp530-Debian-8:~$ 

now when I reboot there is no error in the onscreen message, all looks normal ….

Code: Select all

Loading, please wait...
fsck from util-linux 2.25.2
DEBIAN8: clean,144024/640848 files, 1011533/2560942 blocks

Thanks spacex for your suggestion, you didn’t think it would solve the problem but I’m glad you suggested it anyway. I appreciate your help on getting this issue resolved.


spacex

Posts: 637
Joined: 2015-01-17 01:27

Re: fsck error 2 (No such file or directory)while executing

#5

Post

by spacex » 2016-02-15 00:33

hughparker1 wrote:
Thanks spacex for your suggestion, you didn’t think it would solve the problem but I’m glad you suggested it anyway. I appreciate your help on getting this issue resolved.

:lol: Hehe, I had a certain idea that it might work. It wasn’t all out of the blue. But I covered myself from ridicule in case it didn’t. I wasn’t sure enough to put my rep on it :lol:

Anyway, nice to see that it worked. It raises my confidence :D



hughparker1

Posts: 177
Joined: 2014-10-09 21:53
Location: Paisley, United Kingdom

Re: fsck error 2 (No such file or directory)while executing

#7

Post

by hughparker1 » 2016-04-18 14:51

spacex wrote:fstab looks fine as far as I can tell. I can’t find the source now, but I think I recall that rebuilding the initramfs solved it for a user.
As root, or by sudo:

Then reboot…
Probably not going to work, but it can’t hurt either.

another happy customer spacex ! that was a good guess :D






Понравилась статья? Поделить с друзьями:

Читайте также:

  • Error 2 reading file pubring txk please make sure the file is available try again
  • Error 2 reading file keys pubring txk
  • Error 2 no such file or directory opening credential file etc cifs credentials
  • Error 2 in system call createfile
  • Error 1f xx 2700 6f0b мегафон

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии