Xandyr Posted June 2, 2021 Share #1 Posted June 2, 2021 (edited) Hello, Installed not long ago DSM 6.2 on my 918+ (AMD 3400g CPU, 16 GB ram) with Jun 1.04 bootloader. However I have some trouble with high amount of reserved RAM memory. From what I understand from the FAQ (https://xpenology.com/forum/topic/9394-installation-faq/?tab=comments#comment-83064) this happens sometimes and then you need to do some edits in the grub.cfg file. However I dont understand the process of doing that in the best and safest way (I want to use the same USB memory as I do now) 1) Turn off the system 2) Remove the USB, plug it into my computer and find the grub.cfg file and then add disable_mtrr_trim 3) Insert the USB and start up the system? Or the process is more complicated? Thanks! Edited June 2, 2021 by Xandyr Quote Link to comment Share on other sites More sharing options...
Xandyr Posted June 7, 2021 Author Share #2 Posted June 7, 2021 No one have any ideas regarding how to proceed in best/smartest way to edit the grub.cfg file? Quote Link to comment Share on other sites More sharing options...
flyride Posted June 7, 2021 Share #3 Posted June 7, 2021 The strange part of this question is that you edited grub.cfg when you built your system. So here is the FAQ entry that covers this: https://xpenology.com/forum/topic/13061-tutorial-install-dsm-62-on-esxi-67/ And just for good measure, here is a thread that asks and answers the exact same question, and describes a different access method: https://xpenology.com/forum/topic/30105-trying-to-edit-grubcnf-on-installed-system-ds918-623-25426 Search is quite powerful on this forum. Quote Link to comment Share on other sites More sharing options...
Xandyr Posted June 7, 2021 Author Share #4 Posted June 7, 2021 (edited) 58 minutes ago, flyride said: The strange part of this question is that you edited grub.cfg when you built your system. So here is the FAQ entry that covers this: https://xpenology.com/forum/topic/13061-tutorial-install-dsm-62-on-esxi-67/ And just for good measure, here is a thread that asks and answers the exact same question, and describes a different access method: https://xpenology.com/forum/topic/30105-trying-to-edit-grubcnf-on-installed-system-ds918-623-25426 Search is quite powerful on this forum. Thanks for the reply. The question is not regarding edit the grub file like I did before installing everything. Now after the installation and now that my server is up and running I just want to make sure what's the process of editing the grub file without messing anything up on my system are. What's steps should I take, can I edit without losing everything, without needing to redo the installation process. I searched this forum and with Google for days without finding my answer unfortunately. Edit: and I'm not using EXSi (I see you refer to some links using that) but that maybe doesn't matter? Edited June 7, 2021 by Xandyr Quote Link to comment Share on other sites More sharing options...
flyride Posted June 7, 2021 Share #5 Posted June 7, 2021 3 hours ago, Xandyr said: Edit: and I'm not using EXSi (I see you refer to some links using that) but that maybe doesn't matter? Sorry, I grabbed the wrong link - here is the baremetal install but the grub edit procedure is identical regardless of esxi vs. baremetal... https://xpenology.com/forum/topic/7973-tutorial-installmigrate-dsm-52-to-61x-juns-loader/ I don't really understand your question though. How to edit grub.cfg, or whether editing grub.cfg will cause you problems? Your first post asked how to edit, so I responded with the install links which talk about this, which conveniently you've done before. I also gave you another link that allows you to edit grub.cfg from within a running system. 3 hours ago, Xandyr said: I searched this forum and with Google for days without finding my answer unfortunately. I'm really not a search Nazi, and this forum is pretty low-key about search (there is a lot of content here, and much of it pertains to old versions) - but come on, why do people post this. Not speaking for anyone besides myself with the following... Ask all the questions you like, but statements like this makes me feel like you don't respect the hundreds of hours that were spent on these posts at all. Urgh. Spoiler Type in "how can i edit grub.cfg" on the search bar and both the baremetal and ESXi install posts come up right under your own thread. Then right below that is "Tutorial: Mount boot stick partitions in Windows (editgrub.cfg, add extra.lzma)" Then tick the option to search "Content Titles only" it narrows down to only two posts - the tutorial and then the explicit procedure to mount synoboot and edit grub.cfg from a working system command line (same content as the second link I provided). 3 hours ago, Xandyr said: can I edit without losing everything, without needing to redo the installation process. Specifically: editing grub.cfg changes the parameters sent to the boot loader. It doesn't have anything explicitly to do with an install. If you really try, you can make your system not boot or blow up your arrays, etc. by making unwise changes in grub.cfg. Just take good notes, be ready to restore prior configurations, etc. if something goesn't go as expected. As always, you should have a backup of your data elsewhere. Quote Link to comment Share on other sites More sharing options...
Xandyr Posted July 5, 2021 Author Share #6 Posted July 5, 2021 On 6/7/2021 at 11:58 PM, flyride said: Sorry, I grabbed the wrong link - here is the baremetal install but the grub edit procedure is identical regardless of esxi vs. baremetal... https://xpenology.com/forum/topic/7973-tutorial-installmigrate-dsm-52-to-61x-juns-loader/ I don't really understand your question though. How to edit grub.cfg, or whether editing grub.cfg will cause you problems? Your first post asked how to edit, so I responded with the install links which talk about this, which conveniently you've done before. I also gave you another link that allows you to edit grub.cfg from within a running system. I'm really not a search Nazi, and this forum is pretty low-key about search (there is a lot of content here, and much of it pertains to old versions) - but come on, why do people post this. Not speaking for anyone besides myself with the following... Ask all the questions you like, but statements like this makes me feel like you don't respect the hundreds of hours that were spent on these posts at all. Urgh. not being a jerk, but search (Reveal hidden contents) Type in "how can i edit grub.cfg" on the search bar and both the baremetal and ESXi install posts come up right under your own thread. Then right below that is "Tutorial: Mount boot stick partitions in Windows (editgrub.cfg, add extra.lzma)" Then tick the option to search "Content Titles only" it narrows down to only two posts - the tutorial and then the explicit procedure to mount synoboot and edit grub.cfg from a working system command line (same content as the second link I provided). Specifically: editing grub.cfg changes the parameters sent to the boot loader. It doesn't have anything explicitly to do with an install. If you really try, you can make your system not boot or blow up your arrays, etc. by making unwise changes in grub.cfg. Just take good notes, be ready to restore prior configurations, etc. if something goesn't go as expected. As always, you should have a backup of your data elsewhere. I just had time to try the editing of the grub.cfg file by turning off the NAS, ejecting the USB and edit the grub.cfg file by same steps as when doing it the first time. So using the OSFMount. I added the command disable_mtrr_trim. Then I burned the new edited synoboot.img to the USB, inserted the USB into my NAS. But still no difference, still same amount of reserved RAM. Tried to redo the process but now for some reason in Explorer window I see two USB drives whereof E: wants me to format the drive and Win32 Diskmanager wont let me burn anything to either D or E: due to error 5. Quote Link to comment Share on other sites More sharing options...
flyride Posted July 6, 2021 Share #7 Posted July 6, 2021 7 hours ago, Xandyr said: Tried to redo the process but now for some reason in Explorer window I see two USB drives whereof E: wants me to format the drive and Win32 Diskmanager wont let me burn anything to either D or E: due to error 5. This is normal. Search on how to clear off the partitions with DISKPART before reburning the loader. Quote Link to comment Share on other sites More sharing options...
Xandyr Posted July 6, 2021 Author Share #8 Posted July 6, 2021 (edited) 8 minutes ago, flyride said: This is normal. Search on how to clear off the partitions with DISKPART before reburning the loader. Ok will do that. So me not clearing off the partitions before burning the new synoboot.img file have resulted in the command disable_mtrr_trim not working? Since i still see same amount of RAM reserved? Edited July 6, 2021 by Xandyr Quote Link to comment Share on other sites More sharing options...
flyride Posted July 6, 2021 Share #9 Posted July 6, 2021 (edited) 'fraid not - I haven't any experience with this problem or how to solve it. I happen to only use Intel, and maybe in part it's an AMD thing? FWIW, disable_mtrr_trim is a Linux boot-time parameter and not explicitly an XPe or DSM feature. It would seem that you can see if the kernel has been flagging it as a problem by searching for "MTRR" in dmesg - i.e. cat /var/log/dmesg | fgrep "MTRR" Also you can see what boot time parameters actually are being applied by searching dmesg like this: cat /var/log/dmesg | fgrep "Command line: " However, this article implies that some part of MTRR issues are due to an older kernel-specific problem (i.e. 3.10 which is what 3615/3617xs are based on) and may not apply to newer kernels (918+ uses 4.4), but this is random google-fu and extrapolation; YMMV. Edited July 6, 2021 by flyride 1 Quote Link to comment Share on other sites More sharing options...
Xandyr Posted July 6, 2021 Author Share #10 Posted July 6, 2021 Thanks! Read somewhere they removed one of the RAM sticks to see if the reserved RAM problem exist. Somebody switched places of the RAM sticks and it worked (somehow). Was thinking of creating a completely new bootable USB with disable_mtrr_trim line from the beginning. Quote Link to comment Share on other sites More sharing options...
Trabalhador Anonimo Posted March 28, 2023 Share #11 Posted March 28, 2023 Hi there, Where can I set disable_mtrr_trim on grub.cfg on DSM 7.1: Quote Link to comment Share on other sites More sharing options...
pocopico Posted March 28, 2023 Share #12 Posted March 28, 2023 1 hour ago, Trabalhador Anonimo said: Hi there, Where can I set disable_mtrr_trim on grub.cfg on DSM 7.1: It depends, which loader are you using ? Quote Link to comment Share on other sites More sharing options...
Trabalhador Anonimo Posted March 29, 2023 Share #13 Posted March 29, 2023 On 3/28/2023 at 11:30 AM, pocopico said: It depends, which loader are you using ? TCRP 0.9.4.3 Quote Link to comment Share on other sites More sharing options...
pocopico Posted March 29, 2023 Share #14 Posted March 29, 2023 5 hours ago, Trabalhador Anonimo said: TCRP 0.9.4.3 If you are using TCRP friend you can edit user_config.json and add it to sata or usb boot Linux line. If you are not just edit boot/grub/grub.cfg and add that to the Linux line Quote Link to comment Share on other sites More sharing options...
Trabalhador Anonimo Posted March 29, 2023 Share #15 Posted March 29, 2023 3 hours ago, pocopico said: If you are using TCRP friend you can edit user_config.json and add it to sata or usb boot Linux line. If you are not just edit boot/grub/grub.cfg and add that to the Linux line You mean Linux line at "menuentry" like this one? linux /zImage withefi earlyprintk syno_hw_version=DS3622xs console=ttyS0,115200n8 netif_num=1 pid=xxxx earlycon=uart8250,io,0x3f8,115200n8 syno_port_thaw=1 mac1=XXXXXXXXXX sn=SSSSSSSSSS vid=0xAAAA elevator=elevator loglevel=15 HddHotplug=0 DiskIdxMap=0A00 syno_hdd_detect=0 vender_format_version=2 syno_hdd_powerup_seq=0 log_buf_len=32M root=/dev/md0 SataPortMap=58 1 Quote Link to comment Share on other sites More sharing options...
pocopico Posted March 30, 2023 Share #16 Posted March 30, 2023 7 hours ago, Trabalhador Anonimo said: You mean Linux line at "menuentry" like this one? linux /zImage withefi earlyprintk syno_hw_version=DS3622xs console=ttyS0,115200n8 netif_num=1 pid=xxxx earlycon=uart8250,io,0x3f8,115200n8 syno_port_thaw=1 mac1=XXXXXXXXXX sn=SSSSSSSSSS vid=0xAAAA elevator=elevator loglevel=15 HddHotplug=0 DiskIdxMap=0A00 syno_hdd_detect=0 vender_format_version=2 syno_hdd_powerup_seq=0 log_buf_len=32M root=/dev/md0 SataPortMap=58 Yes disable_mtrr_trim is a linux kernel cmdline option. 1 Quote Link to comment Share on other sites More sharing options...
Peter Suh Posted March 30, 2023 Share #17 Posted March 30, 2023 (edited) In my case, I can test the AMD Ryzen 2200G and the old AMD G-T44R processor with bare metal. When using an AMD processor in M SHELL for TCRP, the disable_mtrr_trim=1 boot option is automatically added. According to users, there are reports that disable_mtrr_trim=1 works instead of disable_mtrr_trim, so we set this up and test it. In the case of HP N36L/N40L/N54L, there are reports that that option works effectively. But it doesn't seem to work on other processors. I know it has the effect of reducing the reserved space shown at the front of the captured image. My processor concluded that this option was not valid as the before and after states gave the same result. The Linux developer repo of torvalds describes the disable_mtrr_trim option and options related to mtrr clean as follows. https://github.com/torvalds/linux/blob/master/Documentation/admin-guide/kernel-parameters.txt#L1080 disable_mtrr_trim [X86, Intel and AMD only] By default the kernel will trim any uncacheable memory out of your available memory pool based on MTRR settings. This parameter disables that behavior, possibly causing your machine to run very slowly. [AMD G-T44R with disable_mtrr_trim] [AMD Ryzen 2200G with disable_mtrr_trim=1] flyride mentioned to check MTRR in dmesg shows the same message as below in any situation. It is the same whether or not the disable_mtrr_trim option is applied. And the same message on unrelated intel processors. Edited March 30, 2023 by Peter Suh Quote Link to comment Share on other sites More sharing options...
Trabalhador Anonimo Posted March 31, 2023 Share #18 Posted March 31, 2023 it worked like charmed with disable_mtrr_trim (only, no null or =1) on "linux" line of grub.cfg Before disable_mtrr_trim Now lets see if the box does not get too slow. 1 Quote Link to comment Share on other sites More sharing options...
Peter Suh Posted March 31, 2023 Share #19 Posted March 31, 2023 (edited) 21 minutes ago, Trabalhador Anonimo said: it worked like charmed with disable_mtrr_trim (only, no null or =1) on "linux" line of grub.cfg Before disable_mtrr_trim Now lets see if the box does not get too slow. What are your bare metal system specs? I found out that it is 16GB in the capture. Is it AMD Ryzen? MB: M5A78L-M LX/BR CPU: Athlon 2 X4 RAM: 12GB HDD: 3x 1TB + 1x 2TB Onboard NIC: Realtek® 8111E Is it your's? Edited March 31, 2023 by Peter Suh Quote Link to comment Share on other sites More sharing options...
Trabalhador Anonimo Posted April 1, 2023 Share #20 Posted April 1, 2023 (edited) 12 hours ago, Peter Suh said: What are your bare metal system specs? I found out that it is 16GB in the capture. Is it AMD Ryzen? MB: M5A78L-M LX/BR CPU: Athlon 2 X4 RAM: 12GB HDD: 3x 1TB + 1x 2TB Onboard NIC: Realtek® 8111E Is it your's? This is me, but I made some changes on memory, upgrade to 16Gb, and NIC, I set a new card with 2 ports: Dell Broadcom Bcm95720a Dual Port 1gb Pci. VMM did not work. Edited April 1, 2023 by Trabalhador Anonimo 1 Quote Link to comment Share on other sites More sharing options...
wakk Posted June 16, 2023 Share #21 Posted June 16, 2023 (edited) Thank you! I am using ARPL. In Cmdline menu, added disable_mtrr_trim with null value. Direct boot set to true DSM 7.1 HP N40L Before After Edited June 16, 2023 by wakk Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.