Closed Chadster766 closed 4 years ago
hi @Chadster766 - you have a typo in the rootfs link. This one works:
wget --user=mcdebian --password=mcdebian123 http://www.protechs-online.com/downloads/McDebian/rootfs/mcdebian-buster-router-wrt-1900-1200-3200-32x-kernel_4_19_75-base.gz
Thank for Buster!! Cheers!
Hi @popoviciri,
Thanks for the heads up :smiley: I've corrected the link typo "WRT" to "wrt".
Great! Could you please push this beta branch?
I've push the Linux 4.19.75 .config and the few changes to the rootfs to the repo.
@Chadster766 How about change .config
# CONFIG_CMDLINE_FROM_BOOTLOADER is not set
CONFIG_CMDLINE_FORCE=y
to
CONFIG_CMDLINE_FROM_BOOTLOADER=y
# CONFIG_CMDLINE_FORCE is not set
Because I want to change Kernel command line with U-boot "bootargs"'s value, Then I can change root partition(root=/dev/sda2 or root=PARTUUID=...) as I need.
And I have tested with my WRT1200ac v1, "bootargs" is not defined by default. If bootargs is set in uboot, kernel will use the bootargs's value as Kernel command line ; if bootargs is not define in uboot, kernel will use the set in .config
So, what do you think about it?
One more thing, I suggest add "panic=5" to kernel cmdline.
Because kernel will panic if rootfs is not found and etc. Without "panic=", system will keep in the panic status and no auto reboot. With "panic=5" system can auto reboot in 5 seconds when kernel panic, after reboot 3 time, the router will auto reboot to another system.
I thik this is the better way to deal kernel panic.
@Chadster766 How about change .config
# CONFIG_CMDLINE_FROM_BOOTLOADER is not set CONFIG_CMDLINE_FORCE=y
to
CONFIG_CMDLINE_FROM_BOOTLOADER=y # CONFIG_CMDLINE_FORCE is not set
Because I want to change Kernel command line with U-boot "bootargs"'s value, Then I can change root partition(root=/dev/sda2 or root=PARTUUID=...) as I need.
And I have tested with my WRT1200ac v1, "bootargs" is not defined by default. If bootargs is set in uboot, kernel will use the bootargs's value as Kernel command line ; if bootargs is not define in uboot, kernel will use the set in .config
So, what do you think about it?
I like the idea but the WRT u-boot does create the bootargs var at startup:
root@MCDEBIAN:~# fw_printenv nandboot nandboot=setenv bootargs console=ttyS0,115200 root=/dev/mtdblock6 ro rootdelay=1 rootfstype=jffs2 earlyprintk $mtdparts;nand read $defaultLoadAddr $priKernAddr $priKernSize; bootm $defaultLoadAddr
One more thing, I suggest add "panic=5" to kernel cmdline.
Because kernel will panic if rootfs is not found and etc. Without "panic=", system will keep in the panic status and no auto reboot. With "panic=5" system can auto reboot in 5 seconds when kernel panic, after reboot 3 time, the router will auto reboot to another system.
I thik this is the better way to deal kernel panic.
Good idea I'm going to add this change.
I should mention that the versions of u-boot on the WRT only really works upon boot with the USB2.0 port so it's kind of a null issue. Please correct me if I'm wrong :smile:
I should mention that the versions of u-boot on the WRT only really works upon boot with the USB2.0 port so it's kind of a null issue. Please correct me if I'm wrong 😄
Yes, I can load kernel img through usb 2.0 and esata, but can't find usb device that plug in usb 3.0 ports after usb reset.
Finally, I use a 2.5 SATA SSD with a power esata cable, It's great! And I changed the nandboot to boot from ssd. It's easy to change the kernel.
#fw_setenv nandboot 'scsi reset; ext2load scsi 0:2 $defaultLoadAddr boot.img; setenv bootargs root=/dev/sda1 rootdelay=5 rootfstype=ext4 rw init=/sbin/init console=ttyS0,11 5200 panic=5; bootm $defaultLoadAddr'
The u-boot may only support mbr partition table, when I use gpt partition table,uboot is frozen after usb reset/scsi reset.
I like the idea but the WRT u-boot does create the bootargs var at startup:
root@MCDEBIAN:~# fw_printenv nandboot nandboot=setenv bootargs console=ttyS0,115200 root=/dev/mtdblock6 ro rootdelay=1 rootfstype=jffs2 earlyprintk $mtdparts;nand read $defaultLoadAddr $priKernAddr $priKernSize; bootm $defaultLoadAddr
I'm sorry, I forgot this.... Change nandboot/altnandboot or not is a question😄
I can't change nandboot or altnandboot because it will break compatibility with linksys and other open source firmwares.
Hi all. @zhouruixi U-Boot can use GPT table -
root@wrt3200acm:~# fdisk -l
Disk /dev/sda: 119.2 GiB, 128035676160 bytes, 250069680 sectors
Disk model: SPCC Solid State
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: gpt
Disk identifier: A7D3AD04-F3D0-43D0-8A1E-C4C79E5BDAF1
Device Start End Sectors Size Type
/dev/sda1 2048 20973567 20971520 10G Linux root (ARM)
/dev/sda2 20973568 21006336 32769 16M Linux extended boot
/dev/sda3 21008384 21041152 32769 16M Linux extended boot
/dev/sda4 21043200 23140351 2097152 1G Linux swap
/dev/sda5 23140352 250069645 226929294 108.2G Linux home
Thanks @ValCher1961,
In one of the closed issues I created a custom kernel with a hard coded uuid in the kernel command line and it worked fine.
I discontinued it because the setup was more steps to set the usb drive with the specific uuid on the partition to boot from.
I also discovered that u-boot was unreliable to boot the rootfs off the usb3.0 port. So I though users could have the rootfs on usb2.0 and high speed media on the usb3.0.
Yes, it's a reasonable use of usb3 for external high-speed drives
Hi, I want to use root=PARTUUID=
before, but now I think root=PARTLABEL=
is better.
According to init/do_mounts.c, root=PARTLABEL need a GPT part table.
So I create a GPT part table for my ssd, but in uboot, when I run usb reset
or scsi init
, uboot is frozen below. Something I did wrong? @ValCher1961
My device is WRT1200AC v1, uboot version is :
# fdisk -l /dev/sdb
Disk /dev/sdb: 29.84 GiB, 32017047552 bytes, 62533296 sectors
Disk model: LMS-32S9M-1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 4096 bytes / 33553920 bytes
Disklabel type: gpt
Disk identifier: AE003959-3DB8-404D-A485-7A39C171162D
Device Start End Sectors Size Type
/dev/sdb1 2048 62531583 62529536 29.8G Linux filesystem
I can't change nandboot or altnandboot because it will break compatibility with linksys and other open source firmwares.
@Chadster766 Okay, I had compile the kernel use your config by myself. Thanks again. By the way, is there any kernel patchs used ? or just VIRTUAL kernel?
Pure kernel with mwlwifi driver added.
@zhouruixi Do you want to choose a disk by "LABEL" rather than by sdaN or UUID? Honestly, I haven't even tried it. Show your bootargs
@ValCher1961 My problem is : usb reset
or scsi reset
does not work when disk have GPT partition table!
when I enter usb reset, usb ssd LED lights up, but this message hangs, like this issue said: https://github.com/ValCher1961/McDebian_WRT3200ACM/issues/5#issue-422429257
I try format sda1 to ext2
and ext4 with -O ^64bit
, The result is same. So, I think u-boot is not support the disk which have GPT partition table. But you said the uboot support GPT table here.
I went through all my notes and found the kernel command line that worked for me:
CONFIG_CMDLINE="rootdelay=5 root=PARTUUID=c58bfc9b-6899-4bdd-b5cf-97cc69a3cd49 rw init=/sbin/init console=ttyS0,115200"
This worked with a gpt partitioned drive when I hard coded the CONFIG_CMDLINE in the kernel .config
I also use one of the below command to set the partition uuid:
mkfs.ext4 -U c58bfc9b-6399-4bdd-b5cf-97cc69a3cd49 /dev/sda1
tune2fs -U c58bfc9b-6399-4bdd-b5cf-97cc69a3cd49 /dev/sda1
@Chadster766 I remember this line - "CONFIG_CMDLIN" in your notes, we discussed the possibility of using it. @zhouruixi I can't say anything on u-boot wrt1200, I don't have it. Maybe he doesn't support gpt. Try changing the "t" section from "20 Linux filesystem" to "30 Linux extended boot". Also, for scsi you need to use the initial command - "scsi init".
@ValCher1961 I change the partition type to Linux extended boot
but nothing changed. It seems WRT1200AC's u-boot does not support GPT partition table.
Could you post your usb part
's result? Thanks.
scsi reset
is work for my device too.
Marvell>> scsi init
AHCI init for unit0
SATA link 0 timeout.
Target spinup took 0 ms.
Error: SCSI Controller(s) 1B4B:9215 1B4B:9235 not found
scanning bus for devices...
Device 0: (1:0) Vendor: ATA Prod.: PLEXTOR PX-128M6 Rev: 1.09
Type: Hard Disk
Capacity: 122104.3 MB = 119.2 GB (250069680 x 512)
Found 1 device(s).
Marvell>> scsi reset
Reset SCSI
AHCI init for unit0
SATA link 0 timeout.
Target spinup took 0 ms.
Error: SCSI Controller(s) 1B4B:9215 1B4B:9235 not found
scanning bus for devices...
Device 0: (1:0) Vendor: ATA Prod.: PLEXTOR PX-128M6 Rev: 1.09
Type: Hard Disk
Capacity: 122104.3 MB = 119.2 GB (250069680 x 512)
Found 1 device(s).
Here's the usb part from wrt3200
@zhouruixi SCSI with table GPT works?
Oh, just now I noticed why the usb part includes the name - "Partition Type : EFI". Who knows?
That's right, that's the way it should be. :)
@ValCher1961 scsi doesn't work with GPT disk. I'll try to find out what is EFI partition type.
We need more test from who has WRT series devices.
Apparently, there is a difference in the u-boot functions of our very similar devices.
Hi @popoviciri,
Thanks for the heads up I've corrected the link typo "WRT" to "wrt".
I can't believe myself with these download links. I had a second typo in the rootfs download link. "Kernel" should be "kernel".
Sorry everyone :unamused:
@Chadster766 BTW Not sure if you have noticed but if you create a new release (tag), you can attach arbitrary files to it and they will be hosted by GitHub for free. This way there's also an archive of existing releases.
Thanks, I have done that in the past. If I remember correctly my old McWRT repo releases are done like that.
For this application I decided not to publish releases that way but maybe I should reconsider.
Perfect, I was able to upgrade my WRT 1900AC V2 from Stretch to Buster! Working great so far.
I had one issue: I use chrony to keep the NTP time on the router. Chrony tries to install a seccomp syscall filter as a security hardening measure. Due to the McDebian kernel missing CONFIG_SECCOMP=y
, it was not able to start and required disabling the seccomp filter in /etc/default/chrony
.
I will add that to the kernel config and report back.
Hi, unfortunately inability to boot from usb3.0 or esata made this release unusable for me. I tried to boot from other device connected to usb2.0 and attach ssd to usb3.0 but its unaccesable during boot. I'll try to investigate that problem during this week. Cheers and thanks for great work in spite of small problems ;)
Thank you everyone :-)
Please have a look at the 4.19.91 release of McDebian: https://github.com/Chadster766/McDebian/wiki
McDebian 4.19.75 Beta
Updates:
Notes:
I recommend that only users that have TTL access to their WRT routers do McDebian beta testing.
In the WRT1900AC V1 make sure you have the below u-boot envars set to to accommodate the increased kernel size.
Firmware:
Root File System:
IPv6
To enable IPv6 in this beta release you need to enable radvd:
Then uncomment the IPv6 config lines in:
After that reboot the router.