element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet & Tria Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
Avnet Boards General change runlevel on PetaLinux 2014.2
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 3 replies
  • Subscribers 357 subscribers
  • Views 598 views
  • Users 0 members are here
Related

change runlevel on PetaLinux 2014.2

y_okada
y_okada over 11 years ago

I would like to know how to change runlevel (set in /etc/inittab) on PetaLinux 2014.2 or other linux distro working on Microzed.

What I would like to do is to automatically login (without inputting root and password) when booted. So I try to set runlevel to 1 (Singleuser mode).

I prepared following files
- system.dtb : build from PetaLinux
- u-boot.elf : build from PetaLinux
- uImage : build from PetaLinux
- uramdisk.image.gz : made using mkimage from arm_ramdisk.image.gz
- zynq_fsbl.elf : from XSDK

Then, I made BOOT.bin from above files.

I put following files to microSD and booted from microSD.
- BOOT.bin
- image.ub


After booted, I changed /etc/inittab the "initdefaul:" line to 1(single user).
I confirmed that /etc/inittab is correctly changed.
Then I rebooted the PetaLinux and found that the runlevel is still 5 not 1.


How can I preserve the change in runlevel setting?

  • Sign in to reply
  • Cancel
  • zedhed
    0 zedhed over 11 years ago

    Hi y_okada,

    Keep in mind when you boot your MicroZed in the manner you described above, the uramdisk.image.gz gets decompressed and mounted as the root file system in SDRAM memory.  As a result, that file system is stored in volatile memory during runtime and any changes you make to the file system do not persist following a reboot.

    To make the changes permanent, you would need to modify the /etc/inittab located in the file system within your uramdisk.image.gz image (or arm_ramdisk.image.gz) and then repackage that filesystem again and boot from the updated file system image.  There are some instructions for modifying the RAM disk image in this thread here:

    http://microzed.org/content/how-modify-ramdisk-image-comes-release-145

    Regards,

    -Kevin

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • y_okada
    0 y_okada over 11 years ago in reply to zedhed

    Dear Kevin


    Thank you very much for your reply.

    Now I understand why the change in setting is not effective.

    And the information on how to change uramdisk.image.gz you show me is very helpful.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • y_okada
    0 y_okada over 11 years ago

    I changed the ramdisk image according to the steps. But it did not change the /etc/inittab.

    I found that the /etc/inittab in PetaLinux booted using microSD and those in ramdisk image were different.

    On the other hand, the inittab file in PetaLinux booted using microSD is same as build/linux/rootfs/targetroot/etc/inittab in Avnet-MicroZed-z7010-v2014.2, which is used to build system.dtb, uImage, u-boot.elf.


    I may make some mistakes related using the ramdisk.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube