Installation overwrites USB boot stick
Michael Klein
m.klein at mvz-labor-lb.de
Wed Oct 4 09:31:18 CEST 2023
Hi Thomas,
> please check if you are using the newest version of this file.
> In 2017 I've added some code to ignore the USB stick (git show 0e071f2ec8e6be1)
>
> https://github.com/faiproject/fai/blob/master/lib/fai-disk-info
yes, I'm using the current Debian bookworm version.
Unfortunately the code does not seem to work in conjunction with the
autodiscover feature, because the live system is NFS-mounted then:
# mount
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs
(rw,nosuid,noexec,size=217076k,nr_inodes=54269,mode=755,inode64)
devpts on /dev/pts type devpts
(rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,inode64)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,mode=755,inode64)
overlay on / type overlay
(rw,noatime,lowerdir=/live/image,upperdir=/cow/rw,workdir=/cow/work,default_permissions)
tmpfs on /live/cow type tmpfs (rw,relatime,mode=755,inode64)
10.30.0.200:/srv/fai/nfsroot on /live/image type nfs
(ro,noatime,vers=3,rsize=262144,wsize=262144,namlen=255,hard,nolock,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=10.30.0.200,mountvers=3,mountport=41975,mountproto=udp,local_lock=all,addr=10.30.0.200)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
10.30.0.200:/srv/fai/config on /var/lib/fai/config type nfs4
(ro,noatime,vers=4.2,rsize=262144,wsize=262144,namlen=255,acregmin=1800,acregmax=1800,acdirmin=1800,acdirmax=1800,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=10.30.9.126,local_lock=none,addr=10.30.0.200)
# cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz FAI_FLAGS=menu,verbose,createvt
FAI_CONFIG_SRC=nfs://10.30.0.200/srv/fai/config rootovl
root=nfs:10.30.0.200:/srv/fai/nfsroot:vers=3 ip=dhcp quiet
> > As expected, /sys/block/sd*/removable reads '1' for the USB stick and
> > '0' for the SSD.
>
> > What is the advantage of checking the device group instead of the
> > removable flag in /sys here anyway?
> Some people may want to install to a removable disk, for e.g. a micro
> SD card.
ok, makes sense.
More information about the linux-fai
mailing list