Welcome! Log In Create A New Profile

Advanced

Debian on Dell Kace M300

Posted by JDS420 
Re: Debian on Dell Kace M300
July 27, 2023 11:02AM
daviddyer Wrote:
-------------------------------------------------------
> fw_env.config is wrong...

Ok, I corrected it to reflect yours, and now fw_printenv works. I have no idea how it got wrong, since I didn't touch it.

Here's the output:
root@m300-sid:/boot# fw_printenv
baudrate=115200
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; reset
bootcmd_exec=if run load_uimage; then; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
console=ttyS0,115200
device=0:1
devices=usb sata
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-m300.dtb
if_netconsole=ping $serverip
initrd_high=0x40000000
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x2100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
mtdparts=mtdparts=spi0.0:0x7f000@0(uboot),0x1000@0x7f000(u-boot-env)
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb reset; sleep 1; usb reset";  setenv scan_sata "sata init";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=echo Initializing devices...; setenv init_usb "usb reset; sleep 1; usb reset"; setenv init_sata sata init;  setenv init_mmc mmc rescan; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices; do for disknum in $disks; do if test $uenv_loaded -eq 0; then setenv device_type $devtype; setenv disk_number $disknum; run uenv_read; fi; done; done;
uenv_read=echo Loading envs from $device_type $disk_number...; if load $device_type  $disk_number:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; echo ... envs loaded; fi
usb_ready_retry=15
root@m300-sid:/boot#
Re: Debian on Dell Kace M300
July 27, 2023 04:39PM
The fw_env.config you previously used was for other kirkwood boxes, such as dockstar / goflex home / goflex net / PogoE02 /etc. I guess it was the default in the root file system Bodhi built for us.

Since fw_env.config is corrected, I guess you can try to flash the new u-boot now. Back up current env first. This box can do kwboot so no worries about bricking it.
Re: Debian on Dell Kace M300
July 27, 2023 05:17PM
It seems the box is now running the new uboot:
U-Boot 2022.04-tld-1 (Mar 20 2022 - 18:15:15 -0700)
Dell KACE M300
However, since the thumb I have in it is set up for a Stock uboot on ext3 filesystem, it throws this error:
[    7.840186][    T1] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(0,0) ]---
I'll set up ext4 on another thumb with the normal rootfs and see how that works.

Thanks for your help! It's much appreciated.
Re: Debian on Dell Kace M300
July 27, 2023 10:23PM
It seems to work now and boots as expected.
Thanks for the help!
Re: Debian on Dell Kace M300
February 19, 2024 07:45PM
Hi all!
I've got this working with Bookworm, and booting off the USB thumb drive. I swapped the internal SSD on this box with a bigger, useful one. It works great, and does what I need, basically.

I've also been reading the posts about how to set up booting with kernel files on USB and rootfs on HDD/SSD. (https://forum.doozan.com/read.php?3,135972,135972#msg-135972)

So, if I take the next step and carve out a 1G (or so) partition on the SSD, label it as rootfs, install the kernel & everything needed to get it to boot, can it boot without needed the USB drive? As I understand it I could, as the uboot shows it looking for usb and sda (not ide anymore, I think). The remainder of the drive space would be used for data, so 2 partitions overall, unlike on the USB where it uses the entirety of the space for rootfs & data etc.

I welcome input on this.
Thanks!
Re: Debian on Dell Kace M300
February 19, 2024 09:02PM
dhargens,

> So, if I take the next step and carve out a 1G (or
> so) partition on the SSD, label it as rootfs,
> install the kernel & everything needed to get it
> to boot, can it boot without needed the USB drive?

Yes. It will boot the SDD rootfs with the new u-boot, no USB drive needed. One of my M300's is booting this way.

Post your current u-boot envs and I'll help modifying if needed.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 02/19/2024 09:04PM by bodhi.
Jader Marasca
Re: Debian on Dell Kace M300
February 23, 2024 04:26AM
Hi

I own two NEW M300 (one box not even was opened! other one was opened and never really used!).
I'd like to know how to do something usefull with them.

Can you point me in right direction?
(I'm from Brazil!)
Jader Marasca
Re: Debian on Dell Kace M300
February 23, 2024 12:49PM
I'd love to use it as a server/docker/... but I'm a hardware newbie so I'd need instructions about:
1) how to get a new SO on a new disk (a new 120/240 SSD) .. may I use DD from another linux machine to write to it and later replace disk inside M300. Where can I get a .img ready to transfer to new SSD ?

2) how access the new machine ... the M300 has no VGA output (so I imagine it's on SSH but need to know the IP and other details)

3) what other users have done with M300 running DEBIAN (I saw using as LMS on a few messages)... I think the hardware is awesome just lack memory (only 2GB RAM)... all other specifications are fine!

4) Have someone upgraded RAM ? How to ?

I'm a sysadmin so web interfaces are my prefered option, CLI is fine to me... but HARDWARE hacks with wires scares me !!!
I've done some on my life, ando I'M NOT proud of ANY soldering I've EVER done! heheheh
Re: Debian on Dell Kace M300
February 23, 2024 01:26PM
Jader Marasca,

> I'd love to use it as a server/docker/... but I'm
> a hardware newbie so I'd need instructions about:
> 1) how to get a new SO on a new disk (a new
> 120/240 SSD) .. may I use DD from another linux
> machine to write to it and later replace disk
> inside M300. Where can I get a .img ready to
> transfer to new SSD ?

You can install the rootfs directly on the SSD using another Linux box. See the installation instruction in the release thread

Quote

Latest released rootfs: Debian-6.5.7-kirkwood-tld-1-rootfs-bodhi.tar.bz2 (01 Nov 2023)

Note: If this is your first time installation, then you only need rootfs Debian-6.5.7-kirkwood-tld-1-rootfs-bodhi.tar.bz2 (this has kernel linux-6.5.7-kirkwood-tld-1 already installed). Please scroll down to 01 Nov 2023 section for download link and installation instruction.


>
> 2) how access the new machine ... the M300 has no
> VGA output (so I imagine it's on SSH but need to
> know the IP and other details)

SSH. After you booted the M300, its host name is debian, and the IP address is a dynamic IP assigned by your router.

> I'm a sysadmin so web interfaces are my prefered
> option, CLI is fine to me... but HARDWARE hacks
> with wires scares me !!!
> I've done some on my life, ando I'M NOT proud of
> ANY soldering I've EVER done! heheheh

No soldering needed. You can connect serial console to the serial header already factory installed.

Just follow the installation instruction very closely. The instruction is old so replace the rootfs name with the latest one: Debian-6.5.7-kirkwood-tld-1-rootfs-bodhi.tar.bz2.

https://forum.doozan.com/read.php?2,61344,90019#msg-90019

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Dell Kace M300
February 24, 2024 04:16AM
Jader: if it helps any, I also did a write-up on a basic installation of stuff here: https://sudos.wordpress.com/2022/05/27/dell-kace-m300-or-fancy-paperweight-runs-modern-linux/

Ideally the instructions here in this thread should be followed to a T, and while I've posted the image here for reference, there's also an image on the write-up of which pin is which for the serial header. you *do* need a max232 board if you're going to talk to it with a normal PC, else hooking it direct to a Pi or the like will net you much better results.

If you want web administration, the Cockpit package from debian's apt repository might interest you, but it requires systemd is the init system where these boxes are using sysvinit. There was a recent change in the systemd package on backports a couple months ago that screwed up a bunch of things for any kirkwood device running systemd as init for some reason, and I was never able to pinpoint exactly why.

These boxes can't run docker. or rather, I'm sure they can't run it well. Remember that the core is armv5tel, with no hardware FPU, it's entirely done in software. the systems also lag heavily with python scripts including those running in a venv, openjdk hasn't run on armel officially since version 8 (although azul packages for 11 are available if you know where to look) and even with no hardware FPU, the system is only about as powerful as a dual Pentium III 750.

as far as the SSD swap: you'll want to de-case it. most SSDs on the market right now are half-size in the 2.5" enclosure they're in. the writeup above and the pics I posted a couple years ago in this thread should be of help (they're pretty much the same images) but if you find the PCB is too big to screw down, you'll need to cover the two standoffs for the original garbage 16GB transcend SSD with some sort of tape (ideally kapton) to prevent shorting out.

I'll also give you this small hint-hint for later: getting into the bottom of the casing doesn't require removing the feet. stab the area of the foot where the screw is located underneath with a pointy screwdriver and go to town. the foot might lift up a bit but it should keep the screw captive while being a bit harder to turn. In this way, you don't lose the screws and you don't lose the 13 year-old adhesive under the feet! of course if they do fall off, superglue to the rescue, just be careful not to get any on the screw or you're not getting back in without a fight... ask me how I know.
Re: Debian on Dell Kace M300
February 24, 2024 02:09PM
@sudos,

https://sudos.wordpress.com/2022/05/27/dell-kace-m300-or-fancy-paperweight-runs-modern-linux/

Very nice tutorial! I'll add this to the installation post.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Dell Kace M300
March 01, 2024 07:11PM
bodhi Wrote:
-------------------------------------------------------
> > So, if I take the next step and carve out a 1G (or
> > so) partition on the SSD, label it as rootfs,
> > install the kernel & everything needed to get it
> > to boot, can it boot without needed the USB drive?
>
> Yes. It will boot the SDD rootfs with the new
> u-boot, no USB drive needed. One of my M300's is
> booting this way.
>
> Post your current u-boot envs and I'll help
> modifying if needed.

I've successfully followed directions (for a change) and gotten it to boot to the SSD. I've also attached the printenv output.

With a minimal size of 1G for the rootfs, do I have enough for the future, or should I bump it some? Seems like 200M might tight it there's a bunch of stuff to load there, no?
root@debian:~# df -h /dev/sda1
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 974M 710M 197M 79% /

My SSD is 447.13 GiB, so I've got enough to spare.

Thoughts on this?
As always, thanks for everyone's guidance - I've learned so much here, and loved it.
Attachments:
open | download - M300_u-boot_printenv.txt (1.8 KB)
Re: Debian on Dell Kace M300
March 01, 2024 09:06PM
dhargens,

> I've successfully followed directions (for a
> change) and gotten it to boot to the SSD. I've
> also attached the printenv output.

Cool! I'll take a look at the envs to doublecheck.

> With a minimal size of 1G for the rootfs, do I
> have enough for the future, or should I bump it
> some? Seems like 200M might tight it there's a
> bunch of stuff to load there, no?

> My SSD is 447.13 GiB, so I've got enough to
> spare.
>

I would carve out 20 GB for rootfs. Some of my 10 year old rootfs has reached 12 GB (with lots of old kernel files). Even after cleaning up, they re still 8-9 GB usage.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Dell Kace M300
March 01, 2024 09:28PM
bodhi Wrote:
-------------------------------------------------------
> I would carve out 20 GB for rootfs. Some of my 10
> year old rootfs has reached 12 GB (with lots of
> old kernel files). Even after cleaning up, they re
> still 8-9 GB usage.

Cool. Thanks for that guidance. That's up next!
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: