Solved Device busy...

Just as my previous post, "instead of in /boot/loader.conf".;)

Yes, I was just making sure. For one thing OP Ken seems to be transcribing rather than cut-n-pasting some things, e.g:

ls -l /boot/modules/if_re.ko returns
-r-xr-xr 1 root wheel 1046776 DEC 17 10:17 /boot/modules/if_re.ko

Permissions are missing the -x bits for other, and I've not seen ls() print CAPS for month names?
 
But did you also remove it from /boot/loader.conf and before reboot?
No. I will do that today, and retry. I should have thought of doing that, but was very tired and rather overwhelmed with family matters. Thank you.

Ken W7EKB
 
Yes, I was just making sure. For one thing OP Ken seems to be transcribing rather than cut-n-pasting some things, e.g:

Correct. I don't yet know how to cut while in the Xterm and then paste that into Firefox....but I'll learn.

Permissions are missing the -x bits for other, and I've not seen ls() print CAPS for month names?

OK. I'll work on that.

Thanks again,

Ken Gordon
 
Do you really need if_re.ko before kernel is loaded (for example, network booting)?
If not, what happens if you load it by adding it to kld_list in /etc/rc.cof[.local] instead of in /boot/loader.conf?
OK. After removing the lines at /boot/loader.conf and adding the suggested line to rc.conf, everything works fine.

But I still don't understand why having it in /boot/loader.conf worked until I updated FreeBSD-13.2? However, as far as I am concerned, if it works now, I really don't care.....yet. I still have too many other things to do, and my original question still stands.

I am just about convinced that there is some weirdness going on with naming the HDDs, which I still don't understand.

It still looks to me as though the system is using my HDD ada1p2 as swap, while my install is running on my HDD ada2.

So...I am going to disconnect the HDD which does not contain my working install of FreeBSD-13.2 and see what damage , if any, occurs.

And, again, my heartiest thank you to the members of this forum. I am a member of many other forums concerning many other matters of interest to me, and this one is about the most helpful one I have ever been connected with.

Ken Gordon
 
When in Xterm do a cut and paste and when that works switch to firefox and mouse-Left-click in an area where you can type text.
Then, <mouse-Right-click> to get a pop-up menu and select paste, does that work?
 
Got it!!! I had to make a file .Xdefaults in my $HOME directory, include the command XTerm*selectToClipboard: true, then restart X. Works now. Snazzy!!! :)

Highlight the text in Xterm with the mouse, hit Ctrl-C, then Ctrl-V in Firefox.

Ken Gordon
 
When in Xterm do a cut and paste and when that works switch to firefox and mouse-Left-click in an area where you can type text.
Then, <mouse-Right-click> to get a pop-up menu and select paste, does that work?
Not until I made the changes to my .Xdefaults file in my $HOME directory. It works fine now. 👍

Thanks!

Ken Gordon
 
But I still don't understand why having it in /boot/loader.conf worked until I updated FreeBSD-13.2?
Maybe because kernel, modules you specified to load in /boot/loader.conf and modules required by the specified modules got larger on 14.
Now it is strongly encouraged to move modules specified in /boot/loader.conf to /etc/rc.conf[.local] as much as possible keeping only essential-to-boot modules, such as zfs.ko for Root-on-ZFS, in /boot/loader.conf.

Some details:
Loader allocates memory (called staging area) to load kernel and modules. But the size is limited and confugurable only on build time (hard coded in source code).
When attempting to load a module, if remaining staging area is insufficient, it surely fail.
These are done BEFORE KERNEL STARTS. Possibly, half-loaded remnants stays on staging area and kernel mis-understands the module is already loaded, blocking module load via kld_list in /etc/rc.conf.
This should be what happened for you.

In contrast, /etc/rc.conf[.local] is loaded AFTER KERNEL STARTS and kernel can allocate memories to load OUTSIDE THE STAGING AREA.

This is why specifying module via kld_list worked for you.
 
Maybe because kernel, modules you specified to load in /boot/loader.conf and modules required by the specified modules got larger on 14.
Now it is strongly encouraged to move modules specified in /boot/loader.conf to /etc/rc.conf[.local] as much as possible keeping only essential-to-boot modules, such as zfs.ko for Root-on-ZFS, in /boot/loader.conf.

Some details:
Loader allocates memory (called staging area) to load kernel and modules. But the size is limited and confugurable only on build time (hard coded in source code).
When attempting to load a module, if remaining staging area is insufficient, it surely fail.
These are done BEFORE KERNEL STARTS. Possibly, half-loaded remnants stays on staging area and kernel mis-understands the module is already loaded, blocking module load via kld_list in /etc/rc.conf.
This should be what happened for you.

In contrast, /etc/rc.conf[.local] is loaded AFTER KERNEL STARTS and kernel can allocate memories to load OUTSIDE THE STAGING AREA.

This is why specifying module via kld_list worked for you.
Yes. That all makes sense. Anyway, it is working fine now. Thank you.

Ken Gordon
 
Got it!!! I had to make a file .Xdefaults in my $HOME directory, include the command XTerm*selectToClipboard: true, then restart X. Works now. Snazzy!!! :)

Highlight the text in Xterm with the mouse, hit Ctrl-C, then Ctrl-V in Firefox.

Great. Now that works, start by pasting both command and results of:

% gpart show -p

ie, all of your disks in detail.
 
My family and I are heading off to Lewiston, Idaho for Christmas Mass at 8:00 AM. It is 5:30 AM now. Then we are preparing for an extended-family Christmas dinner. If I have a bit of time, I'll do that today. Otherwise, it will be tomorrow.

And Merry Christmas to everyone here.

Again, thank you all for the help. You are good people.

Ken Gordon
 
get a "Device busy" message, which says to me that it is still mounted.

Maybe a dumb question, but did you use umount and sysutils/gpart as root? Otherwise the commands could fail. 'Device busy' comes from being avaliable for other users.

Other thing might be to delete all files from the volumes and then delete them.
 
Maybe a dumb question, but did you use umount and sysutils/gpart as root? Otherwise the commands could fail. 'Device busy' comes from being avaliable for other users.

Certainly true for umount.

I believe Ken's using FreeBSD's gpart(8) rather than a port of the Linux one, in which case you can run non-destructive commands like 'show' as a non-root user, at least if a member of group operator.
 
Yes, I did the above as root. However, I did SU I suppose I could log in as root and try it again.

I STILL think that part of the drive I am trying to get rid of is being used as the system I have installed on the OTHER drive as its swap file.

But, I'll get it figured out eventually.

Thanks.

Ken Gordon
 
Certainly true for umount.

I believe Ken's using FreeBSD's gpart(8) rather than a port of the Linux one, in which case you can run non-destructive commands like 'show' as a non-root user, at least if a member of group operator.
Yes. Exactly. My regular user is part of the wheel, operator, video, and www groups.

Ken Gordon
 
Great. Now that works, start by pasting both command and results of:

% gpart show -p

ie, all of your disks in detail.
The command, as root, as given: gpart show -p

And the result:

=> 63 312579632 ada3 MBR (149G)
63 312560577 ada3s1 ntfs [active] (149G)
312560640 19055 - free - (9.3M)

=> 63 312579632 diskid/DISK-5VM7Q5K9 MBR (149G)
63 312560577 diskid/DISK-5VM7Q5K9s1 ntfs [active] (149G)
312560640 19055 - free - (9.3M)

=> 63 976770992 ada0 MBR (466G)
63 975693957 ada0s1 ntfs [active] (465G)
975694020 1852 - free - (926K)
975695872 1071104 ada0s2 !39 (523M)
976766976 4079 - free - (2.0M)

=> 0 3907029168 ada1 BSD (1.8T)
0 3898605568 ada1a freebsd-ufs (1.8T)
3898605568 8388608 ada1b freebsd-swap (4.0G)
3906994176 34992 - free - (17M)

=> 40 3907029088 ada2 GPT (1.8T)
40 1024 ada2p1 freebsd-boot (512K)
1064 3898604536 ada2p2 freebsd-ufs (1.8T)
3898605600 8388608 ada2p3 freebsd-swap (4.0G)
3906994208 34920 - free - (17M)

=> 63 976770992 diskid/DISK-9VMV4Y01 MBR (466G)
63 975693957 diskid/DISK-9VMV4Y01s1 ntfs [active] (465G)
975694020 1852 - free - (926K)
975695872 1071104 diskid/DISK-9VMV4Y01s2 !39 (523M)
976766976 4079 - free - (2.0M)

=> 40 3907029088 diskid/DISK-ZFL46YCC GPT (1.8T)
40 1024 diskid/DISK-ZFL46YCCp1 freebsd-boot (512K)
1064 3898604536 diskid/DISK-ZFL46YCCp2 freebsd-ufs (1.8T)
3898605600 8388608 diskid/DISK-ZFL46YCCp3 freebsd-swap (4.0G)
3906994208 34920 - free - (17M)

As you can see, I have 4 HDDs in this computer: the 160 GB drive is my old WinXP, the 500 GB drive is my present Win10 installation. DISK-ZFL46YCC contains my present FreeBSD install. DISK-9VMV4Y01 is my second 2TB drive on which I had attempted an earlier install of FreeBSD-13.2-RELEASE .

When I do cat /etc/fstab

I get this:
# Device Mountpoint FStype Options Dump Pass#
/dev/ada2b / ufs rw 1 1
/dev/ada1b none swap sw 0 0
# Added by auto-admin from /usr/local/sbin/auto-add-fdesc-mount
fdesc /dev/fd fdescfs rw 0 0
proc /proc procfs rw 0 0
# linprocfs /compat/linux/proc linprocfs rw 0 0
# tmpfs /compat/linux/dev/shm tmpfs rw,mode=1777 0 0
# linsysfs /compat/linux/sys linsysfs rw 0 0
# End auto-admin addition

The problem entry, as I see it is:
/dev/ada1b

As you can see from the output of gpart show -p, ada1 is the DISK-9VMV4Y01, but if I change that line to dev/ada2c, which should be the swap partition on ada2, the system returns that it can't find it.

So, either the naming of the drives as far as the system is concerned does not mean the same as the naming of the drives under gpart show, or the system is actually using ada1 as its swap drive.

Now, if I change these two lines from
/dev/ada2b / ufs rw 1 1
/dev/ada1b none swap sw 0 0
to

/dev/ada2a / ufs rw 1 1
/dev/ada2b none swap sw 0 0

the system crashes and I had to work very hard to recover.

Ken Gordon
 
Yes, I was just making sure. For one thing OP Ken seems to be transcribing rather than cut-n-pasting some things, e.g:



Permissions are missing the -x bits for other, and I've not seen ls() print CAPS for month names?
Here is the cut-and-paste output:

ls -l /boot/modules/if_re.ko
-r-xr-xr-x 1 root wheel 1046776 Dec 17 10:17 /boot/modules/if_re.ko

Ken Gordon
 
Here is what I do, as root:
gpart show ada1

And here is what I get now;

=> 0 3907029168 ada1 BSD (1.8T)
0 3898605568 1 freebsd-ufs (1.8T)
3898605568 8423600 - free - (4.0G)

Then when I try this (as root):
gpart delete -i 1 ada1

I get this:

gpart: Device busy

Or, if I do this: gpart destroy -F ada1
I also get this:

gpart: Device busy

Ken Gordon
 
Back
Top