Page 1 of 2

Cannot update to 18.3. cannot unmount sda1

PostPosted: Sat Feb 24, 2024 7:43 am
by mdi
Hi, during the update of nwsp2 firmware directly from the web interface, on STEP 2 i receive this:

Code: Select all
=> Firmware upgrade step 2 started:
Firmware package uploaded via fvdw-sl server
package type: new configuration (version > 16.1)
firmware image type: extended file system (version > 17.0)
Check firmware files archive ... OK
Check kernel version... new version must be installed
Check DATABASE file... OK
Check active partition... OK
Install new common firmware files on /dev/sda1, ... Fail
could not unmount the new system partition


I suspect that samba is locking the partition.

Re: Cannot update to 18.3. cannot unmount sda1

PostPosted: Sat Feb 24, 2024 11:09 am
by fvdw
...I suspect that samba is locking the partition.

sda1 is system partition which is not in use in your case as your are booting from sda2. samba should not have anything to do with it as it should only give access to shared folders on p8.
Why do you think samba is locking it? did you make some symlinks on a shared folder on p8 pointing to sda1. Or did you mount sda1 yourself for some reason?

Re: Cannot update to 18.3. cannot unmount sda1

PostPosted: Sat Feb 24, 2024 11:57 am
by Jocko
Hi

the upgrade script tries to unmount all mountpoint using /dev/sda1 before formatting /dev/sda1. So that means you have mounted /dev/sad1 previously on a custom mount point and the firmware failed to unmount it
See the current output of
Code: Select all
mount
cat /proc/mounts

Try again after rebooting the nas

Re: Cannot update to 18.3. cannot unmount sda1

PostPosted: Mon Feb 26, 2024 5:53 pm
by mdi
I didn't check about Samba, it was just a doubt as I was connected to the NAS via Samba from another machine. Please forget it.

But the mount command shows that sda1 is my root:
Code: Select all
root@NAS:/ # mount
/dev/sda1 on / type ext3 (rw,noatime,data=ordered)
none on /proc type proc (rw,noatime)
none on /sys type sysfs (rw,noatime)
none on /dev/pts type devpts (rw,noatime,mode=600,ptmxmode=000)
/dev/sda5 on /rw_fs type ext3 (rw,noatime,data=ordered)
tmpfs on /rw_fs/tmp/usr/var type tmpfs (rw,noatime,size=5000k)
nfsd on /proc/fs/nfsd type nfsd (rw,noatime)
/dev/sda8 on /share/1000 type ext4 (rw,noatime,nodelalloc,data=ordered)


I also have other shares, but they are not interesting for this topic.
I don't see /dev/sda2 being used.

This is my partition table:
Code: Select all
Disk /dev/sda: 3907029168 sectors, 1.8 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 00000000-0000-0000-0000-000000000000
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 3907029134
Partitions will be aligned on 2048-sector boundaries
Total free space is 4062 sectors (2.0 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            4096         1052671   512.0 MiB   8300  Linux filesystem
   2         1052672         2101247   512.0 MiB   8300  Linux filesystem
   3         2101248         3149823   512.0 MiB   8200  Linux swap
   4         3149824         3166207   8.0 MiB     8300  Linux filesystem
   5         3166208         4739071   768.0 MiB   8300  Linux filesystem
   6         4739072         4755455   8.0 MiB     8300  Linux filesystem
   7         4755456         5804031   512.0 MiB   8300  Linux filesystem
   8         5804032      3907029134   1.8 TiB     8300  Linux filesystem


I already tried rebooting, but nothing changes.

Re: Cannot update to 18.3. cannot unmount sda1

PostPosted: Mon Feb 26, 2024 6:50 pm
by Jocko
Ok

So it seems that the firmware fails to detect sda1 is in-use (and it is why it failed to unmount it) and it has to install the new version on sda2.

Can you post
Code: Select all
ls -al /lacie-boot
cat /proc/1/root/boot.log

Re: Cannot update to 18.3. cannot unmount sda1

PostPosted: Wed Feb 28, 2024 5:59 am
by mdi
Sure, here it is:

Code: Select all
root@NAS:/ # ls -al /lacie-boot
total 8
drwxrwxr-x   2 root root 4096 2024-02-26 18:54
 .
drwxr-xr-x  23 root root 4096 2024-02-26 18:55
 ..
root@NAS:/ # cat /proc/1/root/boot.log
start boot log
is a physical machine
detect and set platform
nwsp2
kirkwood
UIMAGE-414133-KIRKWOOD-1
Current kernel: 4.14.133 #1 PREEMPT Wed Jul 17
 14:46:56 CEST 2019
nwsp2
kirkwood
 mount dev/pts
update dev nodes
booting using sda1 file system...
root@NAS:/ #

Re: Cannot update to 18.3. cannot unmount sda1

PostPosted: Wed Feb 28, 2024 9:00 am
by Jocko
Hi

So there is an issue. The expected file is missing in lacie-boot :scratch To explain the issue, it may be :
- you delete it previously. I do not think that ! Please to note the update script updates it only when the upgrade is completed (not at this step)
- the boot script on sda7 is corrupted and stops before creating it. I think yes because some lines are missing, it should stop on these lines
Code: Select all
else loop1 finished
rcS finished
- or fs on sda7 is corrupted and the boot script on sda7 fails to create it

So can you post
Code: Select all
ls -l /proc/1/root/lacie-boot
ls -l /proc/1/root/fvdw-chroot/lacie-boot
ls -l /proc/1/root/etc/init.d/rcS
cp /proc/1/root/etc/init.d/rcS /direct-usb/fvdw/rcS.sda7

Re: Cannot update to 18.3. cannot unmount sda1

PostPosted: Wed Feb 28, 2024 9:24 am
by fvdw
@Jocko for consideration.
The rcS script on sda7 only loads firmware from sda1 if the sda1boot file is present in lacie-boot on sda7. AS it boots from sda1 it means it must be present in /lacie-boot on sda7. That it is not listed in the output of ls -al /lacie-boot on sda1 can only be if lacie-boot on sda7 is not mounted on sda1 /lacie-boot.
So something goes wrong in rcS script on sda7

Re: Cannot update to 18.3. cannot unmount sda1

PostPosted: Wed Feb 28, 2024 10:24 am
by Jocko
Indeed it is my idea. Maybe the root script is hanged when it try to bind the folder (ie. fs error ?). This step is just performed (and last step) after running the chrooted boot script and this would explain why root boot log is not complete.

Re: Cannot update to 18.3. cannot unmount sda1

PostPosted: Wed Feb 28, 2024 12:43 pm
by mdi
I confirm I didn't delete anything. :)


Code: Select all
root@NAS:/ # ls -l /proc/1/root/lacie-boot
total 0
-rw-r--r--  1 root root 0 2023-04-08 18:38 sda1boot
root@NAS:/ # ls -l /proc/1/root/fvdw-chroot/lacie-boot
total 0
root@NAS:/ # ls -l /proc/1/root/etc/init.d/rcS
-rwxr-xr-x  1 root root 31178 2023-04-09 22:38 /proc/1/root/etc/init.d/rcS
root@NAS:/ # cp /proc/1/root/etc/init.d/rcS /direct-usb/fvdw/rcS.sda7
root@NAS:/ #