Any student I know (including me) who has tried surviving mostly on pasta has inevitably gained weight, so if that concerns you I'd consider making pasta a back up rather than a staple.
I'm in my last year of undergrad and have been living away from home since I was a freshman, and from my experience it's largely about avoiding wastage and working with your own lifestyle.
I'm not sure what your schedule is like, but I'm lucky if I'm home for more than one meal a day during the week. This means I have to think about meals that are good for packing and eating while at school and things that are easy to prepare ahead of time. For example, I'll slow cook a pork shoulder and put the meet in tortillas with beans and cooked greens, then freeze them. They're easy to grab in the morning when I'm running out the door and reheat well. I also like to freeze leftovers as a sort of homemade frozen dinner with a bit of everything in each container. I live with 3 other roommates so I have to be mindful of freezer space which means I can't do huge quantities, but a week's worth of lunches in the freezer is usually good as back up for when I don't have time to make stuff fresh.
I realize that isn't really grocery shopping on the cheap but for me the key is to not let things go to waste, and having a plan for each thing you buy and freezing it or divvying it into a meal for the next day is a good way to ensure you don't lose too much to the garbage. Plus, it helps avoid the temptation of eating on campus.
I often buy spices from the bulk section (although they're not as fresh) which means I can get as much or as little as I need instead of being stuck with a whole bag.
I would check out budgetbytes.blogspot.com. She's got tons of ideas for eating on the cheap and freezing stuff, plus she breaks down what it cost her per serving so you can get an idea of what you'll be spending.