LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 05-20-2018, 02:35 PM   #1
littlebigman
Member
 
Registered: Aug 2008
Location: France
Posts: 658

Rep: Reputation: 35
Question Right way to fsck the root filesystem on an appliance?


Hello,

Before going ahead, I'd like to make sure I understand how to perform a file check on the root filesystem that's installed on a USB keydrive on a Sheevaplug appliance running Debian 9.

I was thinking of running a TFTP server on a remote host from which the Sheevaplug will download Linux into RAM, run fsck from there, and once it's OK, reboot the appliance.

Is this the right way?

Thank you.

Here's infos about the device:
Code:
~# fdisk -l
Disk /dev/mmcblk0: 14.9 GiB, 16012804096 bytes, 31275008 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x40c68308

Device         Boot Start      End  Sectors  Size Id Type
/dev/mmcblk0p1       2048 31275007 31272960 14.9G  c W95 FAT32 (LBA)


Disk /dev/sda: 3.7 GiB, 3999268864 bytes, 7811072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x55a1afc3

Device     Boot   Start     End Sectors  Size Id Type
/dev/sda1  *       2048  450559  448512  219M 83 Linux
/dev/sda2        450560 6805503 6354944    3G 83 Linux
/dev/sda3       6807550 7809023 1001474  489M  5 Extended
/dev/sda5       6807552 7809023 1001472  489M 82 Linux swap / Solaris

~# mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=250696k,nr_inodes=62674,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=51400k,mode=755)
/dev/sda2 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=25,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
/dev/sda1 on /boot type ext2 (rw,relatime,block_validity,barrier,user_xattr,acl)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=51396k,mode=700,uid=1000,gid=1000)
 
Old 05-21-2018, 12:01 PM   #2
Keruskerfuerst
Senior Member
 
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Manjaro KDE, Win 10
Posts: 2,199

Rep: Reputation: 164Reputation: 164
The filesystem must not mounted, when doing a filesystem check.
 
Old 05-22-2018, 03:36 AM   #3
littlebigman
Member
 
Registered: Aug 2008
Location: France
Posts: 658

Original Poster
Rep: Reputation: 35
Thank you.

How do I do this on an appliance where /boot and / are located on a USB keydrive ?
 
Old 05-22-2018, 08:14 AM   #4
Keruskerfuerst
Senior Member
 
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Manjaro KDE, Win 10
Posts: 2,199

Rep: Reputation: 164Reputation: 164
Do you have a linux OS on the SSD or HDD in your computer?
If yes: insert the USB stick in your computer and check, if it is mounted. -> yes: unmount it, then fsck <device> -> no, fsck <device>
If no: download a linux live CD/DVD like, start it and run fsck.

Linux live CD/DVD, like Systemrescue CD or Gentoo install CD
 
Old 05-23-2018, 04:13 AM   #5
littlebigman
Member
 
Registered: Aug 2008
Location: France
Posts: 658

Original Poster
Rep: Reputation: 35
Brilliant!

Why didn't I think of this (ashamed)?

Thank you very much.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
FSCK non-root filesystem after each boot mackowiakp Linux - Newbie 6 04-08-2018 10:31 PM
[SOLVED] fsck on an R/W filesystem genderbender Linux - Newbie 4 08-26-2010 05:09 PM
Mainting a filesystem with FSCK Slick666 Linux - Server 1 02-08-2008 09:28 PM
fsck on root filesystem without reboot? Barx Linux - General 3 03-29-2005 03:55 AM
Repair a filesystem ...fsck is it??????? hrg Linux - General 3 07-24-2004 07:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 10:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration