Linux - Laptop and NetbookHaving a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I am a BIOS engineer.
My linux OS is Ubuntu 9.04.
when I do the following operation , a bug occurs.
command :
# modprobe nvram
# dd of=nvram.img if=/dev/nvram
after inputting the command, I restart my notebook,and modify a option in the setup menu. Save and restart.
when entering linux, I input the following operation to restore the CMOS data :
command :
# modprobe nvram
# dd if=nvram.img of=/dev/nvram
but when I restart the notebook.
the string "CMOS checksum Bad " will display.
I know the file I have saved in the nvram.img is only 114 bytes of CMOS, but the last 128 bytes is not saved. but the option I changed in the setup menu is saved to the extended CMOS,so when I restore the nvram.img to CMOS .the cehcksum is not equal to the earlier one.
So, I want to know why does it only saves the 114 bytes of the CMOS. And If I want to save all the 256bytes CMOS data ,what command should I use?
Thanks
I think that dd doesn't save checksums, thus causing the problem.
As for the 114 of 128 bytes issue, could it be that dd is only saving the used portion of the nvram? I think dd may have a switch so you can specify how much data you'd like to copy.
You could also point a hex editor to /dev/nvram and save the contents of that in a file...
thank you.
But dd command has saved the CMOS checksum.
And the command is also supplied by the customer.
beacause I don not know the content nvram.ko.
so I do not kown how to solve it.
And as most of my colleague don not kown Linux, so this bug is given to me.
Now I think if there is a command to save all the 256 bytes of CMOS.
the bug will be solved !
dear evo2:
thank you.
But your idea will not help to this bug.
the command : modprobe nvram
only copy the 114 bytes of all the 256 bytes.
. So we can not dd more bytes!!
Ok, I'm a bit confused now. We have four differnt numbers floating around here: 114, 144, 128 and 256.
At one point your say:
Quote:
I know the file I have saved in the nvram.img is only 114 bytes of CMOS, but the last 128 bytes is not saved.
So it should be 114+128=242 ?
You also say:
Quote:
Now I think if there is a command to save all the 256 bytes of CMOS
Isn't that what "dd bs=256 count=1 if=foo of=bar" would do?
I'm quite sure your problem can be solved by passing the correct options to dd, but I don't fully understand what you are trying to, and as such can't tell you what the flags are. You can probably work out the options yourself by reading the man page.
Dear evo2:
sorry >
my explaination maybe is not clear.
as the CMOS is all 256 Bytes!
it is divieded into 2 part as every part has 128 byte.
the first 128 bytes CMOS is called standard CMOS and the second 128 bytes is called extended CMOS.
Here when we excute the command : modprobe nvram.
114 bytes will be automatically saved to nvram. The 114 bytes is from offeset 0x0D to 0xFF of starded CMOS.
But why does the customer use the command to save CMOS data, I am really confused. And when We use the command :modprobe nvram. why does it only save the 114 bytes, I also do not kown. Because it may be done by nvram.ko or other drivers of Ubuntu.
So ,if there is a commnd to save all the 256 bytes CMOS. I predict my bug wll be solved.
that is all.
thsnk you!!
Ok, I'm not a bios developer, so although you may have explained something there is every chance I have missunderstood. :-)
Quote:
Originally Posted by jsjcaowei
Dear evo2:
sorry >
my explaination maybe is not clear.
as the CMOS is all 256 Bytes!
it is divieded into 2 part as every part has 128 byte.
the first 128 bytes CMOS is called standard CMOS and the second 128 bytes is called extended CMOS.
Here when we excute the command : modprobe nvram.
114 bytes will be automatically saved to nvram. The 114 bytes is from offeset 0x0D to 0xFF of starded CMOS.
Ok, so when you load the nvram kernel module (modprobe nvram) it is supposed to write 256 bytes to /dev/nvram. However, when you try to read from /dev/nvram there are only 114 bytes.
Ok, I just had a look at the source, nvram.c and seems that 114 bytes is what is expected.
Quote:
But why does the customer use the command to save CMOS data, I am really confused. And when We use the command :modprobe nvram. why does it only save the 114 bytes, I also do not kown. Because it may be done by nvram.ko or other drivers of Ubuntu.
Why don't you ask your customer these questions?
Quote:
So ,if there is a commnd to save all the 256 bytes CMOS. I predict my bug wll be solved.
that is all.
thsnk you!!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.